Exemplo n.º 1
0
 public void OnCollisionEnter(Collision collision)
 {
     if (collision.collider.tag == "Ground")
     {
         TouchedGround?.Invoke();
     }
 }
Exemplo n.º 2
0
 private void OnTriggerEnter(Collider other)
 {
     if (!other.gameObject.CompareTag("Player") && !other.isTrigger)
     {
         if (currentColliders.Count == 0)
         {
             TouchedGround?.Invoke();
             player.ChangeState(-(int)PlayerState.InAir);
         }
         currentColliders.Add(other);
     }
 }
Exemplo n.º 3
0
 private void OnTriggerEnter(Collider other)
 {
     TouchedGround?.Invoke(other);
 }