private void OnTriggerEnter(Collider other)
 {
     if (other.CompareTag("Ring"))
     {
         Destroy(other.gameObject);
         GameManager.Instance.RingCounter = 0;
         if (GameManager.Instance.InSpiritWorld)
         {
             srTransition.WorldTransition();
         }
     }
 }
Пример #2
0
 private void OnCollisionEnter(Collision collision)
 {
     if (collision.collider.tag == "Obstacle")
     {
         GameManager.Instance.IsDead = true;
     }
     else if (collision.collider.tag == "Ring")
     {
         GameManager.Instance.RingCounter++;
         if (GameManager.Instance.RingCounter >= 5 && GameManager.Instance.InSpiritWorld == false)
         {
             FindObjectOfType <AudioManager>().Play("Transition");
             srTransition.WorldTransition();
         }
         RingJuice();
     }
 }