Esempio n. 1
0
 public void Add(InputStates pOther)
 {
     Up = Up || pOther.Up;
     Down = Down || pOther.Down;
     Left = Left || pOther.Left;
     Right = Right || pOther.Right;
     Fire = Fire || pOther.Fire;
     Secondary = Secondary || pOther.Secondary;
     Upgrade = Upgrade || pOther.Upgrade;
 }
Esempio n. 2
0
 public void Add(InputStates pOther)
 {
     Up        = Up || pOther.Up;
     Down      = Down || pOther.Down;
     Left      = Left || pOther.Left;
     Right     = Right || pOther.Right;
     Fire      = Fire || pOther.Fire;
     Secondary = Secondary || pOther.Secondary;
     Upgrade   = Upgrade || pOther.Upgrade;
 }
Esempio n. 3
0
        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();
        }
Esempio n. 4
0
        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();
        }