We will display Game Over by following the ensuing steps:
gmGameOverand activate layers with it.
gameMode = gmGameOver ActivateLayer(gameMode)
scorevalue. Then, close the method.
txtFinalScore.SetText("SCORE: "+score) Return 0 End
This method will take care of showing the 'game over' screen.
Usually, you don't need an extra method to show a layer, but if you do this in multiple places in your code, it makes sense to add a method for it and just call it. It helps in reducing the length of your code by removing ...