In this chapter, we implement hit detection and add a result screen. We check if the player gets hit by a vehicle, and if so, we show the final score and add logic to reset the game.
Result Screen
On game over, we will display a popup with the final score and a reset button. Let’s implement this popup.