예제 #1
0
 void OnTriggerEnter(Collider other)
 {
     if (other.gameObject.CompareTag("Player"))
     {
         if (safePoint == null)
         {
             LastSafezone.SetLastSafePosition(other.gameObject.transform.position);
         }
         else
         {
             LastSafezone.SetLastSafePosition(safePoint.position);
         }
     }
 }
예제 #2
0
 // Start is called before the first frame update
 void Start()
 {
     LastSafezone.SetLastSafePosition(GameObject.FindGameObjectWithTag("Player").transform.position);
     Unity.LEGO.Game.EventManager.AddListener <Unity.LEGO.Game.DeathEvent>(OnPlayerDeath);
     GameInfo.ActiveScene = SceneManager.GetActiveScene().name;
 }