Пример #1
0
 private void OnTriggerEnter(Collider other)
 {
     if (other.name == "fallTrigger" && !falling)
     {
         //Trigger fall
         falling = true;
         this.transform.Find("Sounds").GetComponent <AudioSource>().Play();
     }
     else if (other.name == "exitTrigger")
     {
         //Game over
         this.hitPoints = 0;
         StatisticManager.calculatePlayerDeathStatistics(this, StatisticManager.Death.byJump);
     }
 }