I actually took the liberty of creating my own “lose condition” ahead of this course; mainly because I was in the zone and didn’t want to get out. What I did was added the following to the Update() method within the Attacker script:
Vector2 newPosition = transform.position;
if ( newPosition.x < 1.5f) {
levelManager.YouLose(“Lose”);
}
The level manager YouLose() method simple takes you to the Lose scene.
Any conceivable issues with going this route, instead of Ben’s collider? My initial thought is, “well, you don’t want your Update() method to get to heavy with operations, as it could slow the game down.” But, we’re nearly finished and the only other operations in the Update() method is the “isAttacking” behavior. So I think we’re okay there.
But, I’d love to hear what others have to say! You insights are warmly welcomed!