private void OnTriggerEnter2D(Collider2D collision) { if (collision is CircleCollider2D) { mrStuntman.hitAudio.Play(); mrStuntman.Fall(); } }
private void OnTriggerEnter2D(Collider2D collision) { if (collision is BoxCollider2D && collision && collision.attachedRigidbody.velocity == new Vector2(0.0f, 0.0f)) { mrStuntman.hitAudio.Play(); mrStuntman.Fall(); } }