using System; using System.Collections.Generic; using System.Text; using DarkWynter.Engine.Controllers; using Microsoft.Xna.Framework.Input; namespace OperationDrawDown { public class PlayerController : Controller { public PlayerController(int playerNumber) : base(playerNumber) { this.Add(new KeyboardControl(Keys.Up, MoveUp, 10)); this.Add(new KeyboardControl(Keys.Down, MoveDown, 10)); this.Add(new KeyboardControl(Keys.Left, MoveLeft, 10)); this.Add(new KeyboardControl(Keys.Right, MoveRight, 10)); } public void MoveRight(ControllerBoolEventArgs args) { Engine._self.player.MoveRight(); } public void MoveLeft(ControllerBoolEventArgs args) { Engine._self.player.MoveLeft(); } public void MoveUp(ControllerBoolEventArgs args) { Engine._self.player.MoveUp(); } public void MoveDown(ControllerBoolEventArgs args) { Engine._self.player.MoveDown(); } } }