Ejemplo n.º 1
0
        internal override void touchUp(DTouch touch)
        {
            DSpriteNode spriteNode = spinnyNode();

            spriteNode.color    = Color.Red;
            spriteNode.position = touch.locationIn(this);
            addChild(spriteNode);
        }
Ejemplo n.º 2
0
        internal override void touchDown(DTouch touch)
        {
            label.run(pulse, "fadeInOut");

            DSpriteNode spriteNode = spinnyNode();

            spriteNode.color    = Color.Green;
            spriteNode.position = touch.locationIn(this);
            addChild(spriteNode);
        }
Ejemplo n.º 3
0
        internal override void touchUp(DTouch touch)
        {
            base.touchUp(touch);

            if (state == nextState)
            {
                switch (state)
                {
                case State.load:
                    nextState = State.mainMenu;
                    break;

                case State.mainMenu:
                    break;
                }
            }
        }
Ejemplo n.º 4
0
        internal void touchMoved(DTouch touch)
        {
            var x = touch.locationIn(parent).X;

            if (x > DScene.current.size.X / 2.0f)
            {
                x = DScene.current.size.X / 2.0f;
            }
            else
            {
                if (x < -DScene.current.size.X / 2.0f)
                {
                    x = -DScene.current.size.X / 2.0f;
                }
            }

            position = Vector2.Lerp(position, new Vector2(x, position.Y), 0.1f);
        }
        internal override void touchUp(DTouch touch)
        {
            base.touchUp(touch);

            if (state == nextState)
            {
                switch (state)
                {
                case State.mainMenu:
                    if (buttonPlay.state == ButtonState.Pressed && buttonPlay.contains(touch.locationIn(buttonPlay.parent)))
                    {
                        nextState = State.battle;
                    }
                    break;

                case State.battle:
                    break;
                }
            }
        }
 internal override void touchMoved(DTouch touch)
 {
     base.touchMoved(touch);
     ship.touchMoved(touch);
 }
 internal override void touchDown(DTouch touch)
 {
     base.touchDown(touch);
 }
Ejemplo n.º 8
0
 internal override void touchUp(DTouch touch)
 {
     base.touchUp(touch);
 }