// Called when the player wins/loses public void GameOver() { // Show the scores and game over message ShowGameOverMessage(); // Stops the player and enemy snake from moving playerSnakeScript.CancelInvoke("MoveSnake"); enemySnakeScript.CancelInvoke("MoveSnake"); }