Exemple #1
0
    /// <summary>
    /// Input Setup Method for Specific Player.
    /// Add Implementation in Inherited Class for Application
    /// </summary>
    /// <returns>InputState for Requested Player</returns>
    public virtual void GetKeyboard2Input(InputState IS)
    {
        // Example Input binding.

        IS.AddAxis("Horizontal", Input.GetAxis("P2Horizontal"));
        IS.AddAxis("Vertical", Input.GetAxis("P2Vertical"));
        IS.AddButton("Fire1", Input.GetButton("P2Fire1"));
        IS.AddButton("Fire2", Input.GetButton("P2Fire2"));
        IS.AddButton("Fire3", Input.GetButton("P2Fire3"));
        IS.AddButton("Fire4", Input.GetButton("P2Fire4"));
    }
    public virtual InputState GetPlayer1Input()
    {
        InputState IS = InputState.GetBlankState();

        IS.AddAxis("Horizontal", Input.GetAxis("Horizontal"));
        IS.AddAxis("Vertical", Input.GetAxis("Vertical"));
        IS.AddButton("Fire1", Input.GetButton("Fire1"));
        IS.AddButton("Fire2", Input.GetButton("Fire2"));
        IS.AddButton("Fire3", Input.GetButton("Fire3"));
        IS.AddButton("Fire4", Input.GetButton("Fire4"));
        return(IS);
    }
Exemple #3
0
    public override InputState GetPlayer4Input()
    {
        InputState IS = InputState.GetBlankState();

        IS.AddAxis("Horizontal", Input.GetAxis("P4Horizontal"));
        IS.AddAxis("Vertical", Input.GetAxis("P4Vertical"));
        IS.AddButton("Fire1", Input.GetButtonDown("P4Fire1"));
        IS.AddButton("Fire2", Input.GetButtonDown("P4Fire2"));
        IS.AddButton("Fire3", Input.GetButtonDown("P4Fire3"));
        IS.AddButton("Fire4", Input.GetButtonDown("P4Fire4"));
        return(IS);
    }
Exemple #4
0
    public virtual void GamepadInput(InputState IS, Gamepad device)
    {
        if (!device.added)
        {
            return;
        }

        // Example Input binding.
        IS.AddAxis("Horizontal", device.leftStick.x.ReadValue());
        IS.AddAxis("Vertical", device.leftStick.y.ReadValue());
        IS.AddButton("Fire1", device.buttonSouth.wasPressedThisFrame);
        IS.AddButton("Fire2", device.buttonWest.wasPressedThisFrame);
        IS.AddButton("Fire3", device.buttonEast.wasPressedThisFrame);
        IS.AddButton("Fire4", device.buttonNorth.wasPressedThisFrame);
    }
    public override InputState GetPlayer1Input()
    {
        // Example Input binding.
        InputState IS = InputState.GetBlankState();

        IS.AddAxis("LookHorizontal", Input.GetAxis("Mouse Y"));
        IS.AddAxis("LookVertical", Input.GetAxis("Mouse X"));
        IS.AddAxis("MoveHorizontal", Input.GetAxis("Horizontal"));
        IS.AddAxis("MoveVertical", Input.GetAxis("Vertical"));
        IS.AddButton("Fire1", Input.GetButtonDown("Fire1"));
        IS.AddButton("Fire2", Input.GetButton("Fire2"));    //This will be changed to GetButtonDown when lighter is implimented
        IS.AddButton("Fire3", Input.GetButton("Fire3"));
        IS.AddButton("Fire4", Input.GetButton("Fire4"));
        IS.AddButton("Cancel", Input.GetButtonDown("Cancel"));
        return(IS);
    }
    public override InputState GetPlayer1Input()
    {
        // Example Input binding.
        InputState IS = InputState.GetBlankState();

        IS.AddAxis("LookHorizontal", Input.GetAxis("Mouse Y"));
        IS.AddAxis("LookVertical", Input.GetAxis("Mouse X"));
        IS.AddAxis("MoveHorizontal", Input.GetAxis("Horizontal"));
        IS.AddAxis("MoveVertical", Input.GetAxis("Vertical"));
        IS.AddButton("Fire1", Input.GetButtonDown("Fire1"));
        IS.AddButton("Fire2", Input.GetButtonDown("Fire2"));
        IS.AddButton("Fire3", Input.GetButton("Fire3"));
        IS.AddButton("Fire4", Input.GetButtonDown("Fire4"));
        IS.AddButton("Fire5", Input.GetButton("Fire5"));
        return(IS);
    }
Exemple #7
0
    /// <summary>
    /// Input Setup Method for Specific Player. A
    /// dd Implementation in Inherited Class for Application
    /// </summary>
    /// <returns>InputState for Requested Player</returns>
    public virtual void GetKeyboard1Input(InputState IS)
    {
        // Example Input binding.

        IS.AddAxis("Horizontal", Input.GetAxis("Horizontal"));
        IS.AddButton("Vertical", Input.GetButtonDown("Vertical"));
        IS.AddButton("Fire1", Input.GetButtonDown("Fire1"));
        IS.AddButton("Fire2", Input.GetButtonDown("Fire2"));
        IS.AddButton("Interact", Input.GetButtonDown("Interact"));
        //IS.AddButton("Fire4", Input.GetButton("Fire4"));
    }