public override void Loop(MovingObject pShip) { InputStates.Up = InputStates.GetKey(Keys.Up); InputStates.Down = InputStates.GetKey(Keys.Down); InputStates.Left = InputStates.GetKey(Keys.Left); InputStates.Right = InputStates.GetKey(Keys.Right); InputStates.Fire = InputStates.GetKey(Keys.C); InputStates.Secondary = InputStates.GetKey(Keys.X); InputStates.Upgrade = InputStates.GetKey(Keys.Z); InputStates.DetectPresses(); }
public override void Loop(MovingObject pShip) { if (Targets.Count == 0) { Targets.Add(new Vector3((Methods.Random.NextDouble() - 0.5) * World.Instance.Arena.Width, (Methods.Random.NextDouble() - 0.5) * World.Instance.Arena.Height, 0)); } InputStates.Clear(); //InputStates.Fire = Methods.Random.Next(128) == 0; // Temporary random fire. InputStates.Add(MoveToNextTarget(pShip)); InputStates.DetectPresses(); }