Advertisement
Guest User

Untitled

a guest
Nov 12th, 2013
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using UnityEngine;
  2. using System.Collections;
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9. // Respawn points are selected when triggered by player
  10. public class RespawnPoint : MonoBehaviour {
  11.  
  12. // Use this for initialization
  13. void Start () {
  14.  
  15. }
  16.  
  17. // Update is called once per frame
  18. void Update () {
  19.  
  20. }
  21.  
  22. void OnTriggerEnter(Collider collider) {
  23. if (collider.tag != "Player")
  24. return;
  25.  
  26. // Set as default trigger point
  27. FallDetectorDeathZone detector = transform.parent.GetComponent<FallDetectorDeathZone>();
  28. detector.defaultRespawnPoint = this;
  29. }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement