示例#1
0
 public void OnCollisionEnter(Collision collision)
 {
     if (collision.collider.tag == "Ground")
     {
         TouchedGround?.Invoke();
     }
 }
 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);
     }
 }
示例#3
0
 private void OnTriggerEnter(Collider other)
 {
     TouchedGround?.Invoke(other);
 }