Exemplo n.º 1
0
        protected override SpaceShipControlInput GetControls()
        {
            SpaceShipControlInput input = new SpaceShipControlInput();

            input.Fire1  = Fire.GetButtonState();
            input.Fire2  = FireSecondary.GetButtonState();
            input.LookAt = Cursor.Position;
            input.Strafe = Strafe.GetAxisPosition();
            input.Thrust = Thrust.GetAxisPosition();
            input.Select = Select.GetButtonState();
            for (int i = 0; i < Cycle.Length; ++i)
            {
                if (Cycle[i].GetButtonState())
                {
                    input.CycleWeapon = i;
                }
            }
            input.NextWeapon     = NextWeapon.GetButtonState();
            input.PreviousWeapon = PreviousWeapon.GetButtonState();
            return(input);
        }