Closed ddanakim0304 closed 1 month ago
Fixed:
Added a condition to complete the level only when the player enters the trigger. The OnTriggerEnter function was detecting all the collision including ground tiles without the if statement.
Before
void OnTriggerEnter (Collider other) { gameManager.CompleteLevel(); }
After
void OnTriggerEnter (Collider other) { if (other.tag == "Player") { gameManager.CompleteLevel(); } }
Playing level 4 automatically triggers the level complete function.