Exemplo n.º 1
0
    private void OnCollisionEnter(Collision collision)
    {
        if (collision.transform.GetComponent <MeshCollider>() != null)
        {
            OnTouchedGround?.Invoke();
        }

        _isTouchedGround = true;
    }
Exemplo n.º 2
0
        private void JustTouchedGround(bool isGrounded)
        {
            if (!_justTouchedGround && isGrounded)
            {
                OnTouchedGround?.Invoke();
            }

            _justTouchedGround = isGrounded;
        }
Exemplo n.º 3
0
 private void OnTriggerEnter(Collider other)
 {
     OnTouchedGround?.Invoke(other);
 }