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); } }
private void OnTriggerEnter(Collider other) { TouchedGround?.Invoke(other); }