Endless Runner
1) Please find the github repository link of the game which shows multiple commits and branches. https://github.com/swapvid/Endless-Runner 2) OOP concept has been implemented as below. Encapsulation in GameOver The GameOver
script now encapsulates all logic related to ending the game. It uses a boolean flag (isGameOver
) to prevent multiple activations of the game-over state. The TriggerGameOver
method is now reusable by other scripts like Obstacle
. Inheritance and Modular Collision in Obstacle The Obstacle
script focuses only on detecting collisions and triggering specific behaviors (TriggerGameOver
). It no longer directly manages game-over panel behavior, making the game logic more reusable.