public GameStartLayer(float sx, float sy) : base() { this.sx = sx; this.sy = sy; var touchListener = new CCEventListenerTouchAllAtOnce(); touchListener.OnTouchesEnded = (touches, ccevent) => { var transitionToGame = new CCTransitionRotoZoom(0.7f, GameLayer.GameScene(Window)); Window.DefaultDirector.ReplaceScene(transitionToGame); }; AddEventListener(touchListener, this); }
public GameOverLayer(int score) { var touchListener = new CCEventListenerTouchAllAtOnce(); touchListener.OnTouchesEnded = (touches, ccevent) => Window.DefaultDirector.ReplaceScene(GameLayer.GameScene(Window)); AddEventListener(touchListener, this); scoreMessage = String.Format("Game Over. Your Score : {0} !", score); Color = new CCColor3B(CCColor4B.Black); Opacity = 255; // MobileService.UpdateScoreToServer (score); }
public GameStartLayer() : base() { var touchListener = new CCEventListenerTouchAllAtOnce(); touchListener.OnTouchesEnded = (touches, ccevent) => Window.DefaultDirector.ReplaceScene(GameLayer.GameScene(Window)); AddEventListener(touchListener, this); Color = CCColor3B.Black; Opacity = 255; }
public GameOverLayer(int score) { var touchListener = new CCEventListenerTouchAllAtOnce(); touchListener.OnTouchesEnded = (touches, ccevent) => Window.DefaultDirector.ReplaceScene(GameLayer.GameScene(Window)); AddEventListener(touchListener, this); scoreMessage = String.Format("Game Over. You collected {0} bananas!", score); Color = new CCColor3B(CCColor4B.Black); Opacity = 255; }