private void BackToMenu() { var menuLayer = MenuLayer.CreateScene(GameView); var transitionToMenu = new CCTransitionProgressInOut(0.2f, menuLayer); Director.ReplaceScene(transitionToMenu); }
public TutorialLayer(bool startGameAfter) : base(new CCColor4B(127, 200, 205)) { titleMessage = "How to play: Part {0} of " + tutorials.Length; var touchListener = new CCEventListenerTouchAllAtOnce(); touchListener.OnTouchesEnded = (touches, ccevent) => { currentTutorial++; if (currentTutorial >= tutorials.Length) { if (startGameAfter) { var mainGame = GameLayer.CreateScene(GameView, null); var transition = new CCTransitionProgressInOut(0.2f, mainGame); Director.ReplaceScene(transition); RemoveAllChildren(true); } else { var menuLayer = MenuLayer.CreateScene(GameView); var transition = new CCTransitionProgressInOut(0.2f, menuLayer); Director.ReplaceScene(transition); RemoveAllChildren(true); } } else { SetCurrentMessages(); } }; AddEventListener(touchListener, this); }
private void BackToMenu() { var menuLayer = MenuLayer.CreateScene(GameView); GoToScene(menuLayer); }
private void BackToMenu(object sender) { var menuLayer = MenuLayer.CreateScene(GameView); GoToScene(menuLayer, Configuration.LevelLayer.BackButton.ClickSound); }