예제 #1
0
        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);
        }
예제 #2
0
        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);
        }
예제 #3
0
        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;
        }
예제 #4
0
        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;
        }