public override bool move(Controller.Direction d) { switch (d) { case Controller.Direction.Up: return ks.IsKeyDown(Keys.W); case Controller.Direction.Down: return ks.IsKeyDown(Keys.S); case Controller.Direction.Right: return ks.IsKeyDown(Keys.D); case Controller.Direction.Left: return ks.IsKeyDown(Keys.A); default: return false; } }
public override bool look(Controller.Direction d) { switch (d) { case Controller.Direction.Up: return pos.Y < oldPos.Y; case Controller.Direction.Down: return pos.Y > oldPos.Y; case Controller.Direction.Right: return pos.X > oldPos.X + 1; case Controller.Direction.Left: return pos.X < oldPos.X - 1; default: return false; } }
public override bool move(Controller.Direction d) { switch (d) { case Controller.Direction.Up: return gamePadState.ThumbSticks.Left.Y > 0.5f; case Controller.Direction.Down: return gamePadState.ThumbSticks.Left.Y < -0.5f; case Controller.Direction.Right: return gamePadState.ThumbSticks.Left.X > 0.5f; case Controller.Direction.Left: return gamePadState.ThumbSticks.Left.X < -0.5f; default: return false; } }
public override bool look(Controller.Direction d) { switch (d) { case Controller.Direction.Up: return ks.IsKeyDown(Keys.Up); case Controller.Direction.Down: return ks.IsKeyDown(Keys.Down); case Controller.Direction.Right: return ks.IsKeyDown(Keys.Right); case Controller.Direction.Left: return ks.IsKeyDown(Keys.Left); default: return false; } }
public Player(CompositeModel model, Camera camera, Controller controller) : base(model) { this.damage = 0; this.cam = camera; this.controller = controller; this.wizXZ = Vector2.Zero; this.wizXZvel = Vector2.Zero; this.wizVel = 0f; this.wizFloat = true; this.power = 1f; this.charging = false; this.color = this.model.CustomColor; bearing = 0; this.model.addCollisionCylinder(6.1f, 1f, Vector3.Up * 3.05f); this.model.addBoundingCylinder(6.1f, 1f, Vector3.Up * 3.05f); }
public void remove(Controller c) { this.controllers.Remove(c); }
public void add(Controller c) { this.controllers.Add(c); }