private void OnCollisionEnter2D(Collision2D other)
{
- if (callFoulOnContact && game.player.HasBall && other.gameObject.CompareTag("Ground"))
+ if (!callFoulOnContact) return;
+ Debug.Log("ENTERED");
+ Debug.Log(other.gameObject.CompareTag("Ground"));
+ Debug.Log(game.player.HasBall);
+ Debug.Log("---");
+ if (game.player.HasBall && other.gameObject.CompareTag("Ground"))
game.player.Foul("LOOSE BALL FOUL");
}
}