コード例 #1
0
    public bool GetButtonUp(MiniGameButtons button)
    {
        switch (button)
        {
        case MiniGameButtons.BUTTON1:
            return(Input.GetButtonUp("Fire1"));

        case MiniGameButtons.BUTTON2:
            return(Input.GetButtonUp("Fire2"));

        case MiniGameButtons.BUTTON3:
            return(Input.GetButtonUp("Fire3"));

        case MiniGameButtons.BUTTON4:
            return(Input.GetButtonUp("Fire4"));

        case MiniGameButtons.BUTTON5:
            return(Input.GetButtonUp("Fire5"));

        case MiniGameButtons.BUTTON6:
            return(Input.GetButtonUp("Fire6"));

        default:
            return(false);
        }
    }
コード例 #2
0
    public bool GetButton(MiniGameButtons button)
    {
        switch (button)
        {
        case MiniGameButtons.BUTTON1:
            return(Input.GetButton("Fire1"));

        case MiniGameButtons.BUTTON2:
            return(Input.GetButton("Fire2"));

        case MiniGameButtons.BUTTON3:
            return(Input.GetButton("Fire3"));

        case MiniGameButtons.BUTTON4:
            return(Input.GetButton("Fire4"));

        case MiniGameButtons.BUTTON_START:
            return(Input.GetButton("StartButton"));

        default:
            return(false);
        }
    }
コード例 #3
0
    public bool GetButtonDown(MiniGameButtons button)
    {
        switch (button)
        {
        case MiniGameButtons.BUTTON1:
            return(Input.GetButtonDown("Fire1"));

        case MiniGameButtons.BUTTON2:
            return(Input.GetButtonDown("Fire2"));

        case MiniGameButtons.BUTTON3:
            return(Input.GetButtonDown("Fire3"));

        case MiniGameButtons.BUTTON4:
            return(Input.GetButtonDown("Fire4"));

        case MiniGameButtons.BUTTON_START:
            return(Input.GetKeyDown(KeyCode.Escape));

        default:
            return(false);
        }
    }