public static CCScene SceneWithWinner(CCWindow mainWindow, Board.State?winner) { var scene = new CCScene(mainWindow); var layer = new GameOverLayer(winner); scene.AddChild(layer); return(scene); }
void EndGame() { // Stop scheduled events as we transition to game over scene UnscheduleAll(); var gameOverScene = GameOverLayer.SceneWithWinner(Window, _board.GameState); var transitionToGameOver = new CCTransitionMoveInR(0.3f, gameOverScene); Director.ReplaceScene(transitionToGameOver); }