public static CCScene CreateScene(CCWindow mainWindow, Int64 score) { var scene = new CCScene(mainWindow); var layer = new GameOverLayer(score); scene.AddChild(layer); return(scene); }
void EndGame() { // Stop scheduled events as we transition to game over scene UnscheduleAll(); var gameOverScene = GameOverLayer.CreateScene(Window, currentScore); var transitionToGameOver = new CCTransitionMoveInR(0.3f, gameOverScene); Director.ReplaceScene(transitionToGameOver); }