using UnityEngine;
|
|
using System.Collections;
|
|
|
|
public class checkpoint : MonoBehaviour {
|
|
|
|
public GameObject respawnPoint;
|
|
|
|
// Use this for initialization
|
|
void Start () {
|
|
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update () {
|
|
|
|
}
|
|
|
|
void OnTriggerStay(Collider other) {
|
|
if (other.tag == "Player") {
|
|
other.transform.position = respawnPoint.transform.position;
|
|
}
|
|
}
|
|
|
|
|
|
}
|