internal override void touchUp(DTouch touch) { DSpriteNode spriteNode = spinnyNode(); spriteNode.color = Color.Red; spriteNode.position = touch.locationIn(this); addChild(spriteNode); }
internal override void touchDown(DTouch touch) { label.run(pulse, "fadeInOut"); DSpriteNode spriteNode = spinnyNode(); spriteNode.color = Color.Green; spriteNode.position = touch.locationIn(this); addChild(spriteNode); }
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; } } }