コード例 #1
0
    // ======================================================================================
    public bool GetRight()
    {
        if (m_rightTrigger && InputMgr.GetMenuButton(InputMgr.eMenuButton.RIGHT))
        {
            m_rightTrigger = false;
            return(true);
        }

        return(false);
    }
コード例 #2
0
    public override void Update()
    {
        base.Update();

        for (int i = 0; i < 4; i++)
        {
            // reset triggers when button released
            m_pauseTriggerList[i] = !InputMgr.GetMenuButton(i + 1, InputMgr.eMenuButton.PAUSE) || m_pauseTriggerList[i];
        }
    }
コード例 #3
0
    // ======================================================================================
    public bool GetUp(int player)
    {
        if (m_upTriggerList[player] && InputMgr.GetMenuButton(player + 1, InputMgr.eMenuButton.UP))
        {
            m_upTriggerList[player] = false;
            return(true);
        }

        return(false);
    }
コード例 #4
0
    // ======================================================================================
    public bool GetDown()
    {
        if (m_downTrigger && InputMgr.GetMenuButton(InputMgr.eMenuButton.DOWN))
        {
            m_downTrigger = false;
            return(true);
        }

        return(false);
    }
コード例 #5
0
    public bool GetPause(int player)
    {
        if (m_pauseTriggerList[player] && InputMgr.GetMenuButton(player + 1, InputMgr.eMenuButton.PAUSE))
        {
            m_pauseTriggerList[player] = false;
            return(true);
        }

        return(false);
    }
コード例 #6
0
    public bool GetChangeColor(int player)
    {
        if (m_changeColorTriggerList[player] && InputMgr.GetMenuButton(player + 1, InputMgr.eMenuButton.CHANGE_COLOR))
        {
            m_changeColorTriggerList[player] = false;
            return(true);
        }

        return(false);
    }
コード例 #7
0
    public bool GetSubmit(int player)
    {
        if (m_submitTriggerList[player] && InputMgr.GetMenuButton(player + 1, InputMgr.eMenuButton.SUBMIT))
        {
            m_submitTriggerList[player] = false;
            return(true);
        }

        return(false);
    }
コード例 #8
0
    public bool GetPrevious(int player)
    {
        if (m_previousTriggerList[player] && InputMgr.GetMenuButton(player + 1, InputMgr.eMenuButton.PREVIOUS))
        {
            m_previousTriggerList[player] = false;
            return(true);
        }

        return(false);
    }
コード例 #9
0
    // ======================================================================================
    public bool GetRight(int player)
    {
        if (m_rightTriggerList[player] && InputMgr.GetMenuButton(player + 1, InputMgr.eMenuButton.RIGHT))
        {
            m_rightTriggerList[player] = false;
            return(true);
        }

        return(false);
    }
コード例 #10
0
    // ======================================================================================
    public bool GetDown(int player)
    {
        if (m_downTriggerList[player] && InputMgr.GetMenuButton(player + 1, InputMgr.eMenuButton.DOWN))
        {
            m_downTriggerList[player] = false;
            return(true);
        }

        return(false);
    }
コード例 #11
0
    // ======================================================================================
    public bool GetLeft(int player)
    {
        if (m_leftTriggerList[player] && InputMgr.GetMenuButton(player + 1, InputMgr.eMenuButton.LEFT))
        {
            m_leftTriggerList[player] = false;
            return(true);
        }

        return(false);
    }
コード例 #12
0
    // ======================================================================================
    public bool GetUp()
    {
        if (m_upTrigger && InputMgr.GetMenuButton(InputMgr.eMenuButton.UP))
        {
            m_upTrigger = false;
            return(true);
        }

        return(false);
    }
コード例 #13
0
    // ======================================================================================
    public bool GetLeft()
    {
        if (m_leftTrigger && InputMgr.GetMenuButton(InputMgr.eMenuButton.LEFT))
        {
            m_leftTrigger = false;
            return(true);
        }

        return(false);
    }
コード例 #14
0
    // ======================================================================================
    public bool GetChangeColor()
    {
        if (m_changeColorTrigger && InputMgr.GetMenuButton(InputMgr.eMenuButton.CHANGE_COLOR))
        {
            m_changeColorTrigger = false;
            return(true);
        }

        return(false);
    }
コード例 #15
0
    // ======================================================================================
    public bool GetPause()
    {
        if (m_pauseTrigger && InputMgr.GetMenuButton(InputMgr.eMenuButton.PAUSE))
        {
            m_pauseTrigger = false;
            return(true);
        }

        return(false);
    }
コード例 #16
0
    // ======================================================================================
    public bool GetPrevious()
    {
        if (m_previousTrigger && InputMgr.GetMenuButton(InputMgr.eMenuButton.PREVIOUS))
        {
            m_previousTrigger = false;
            return(true);
        }

        return(false);
    }
コード例 #17
0
    // ======================================================================================
    public bool GetSubmit()
    {
        if (m_submitTrigger && InputMgr.GetMenuButton(InputMgr.eMenuButton.SUBMIT))
        {
            m_submitTrigger = false;
            return(true);
        }

        return(false);
    }
コード例 #18
0
    public virtual void Update()
    {
        // reset triggers when button released
        m_submitTrigger      = !InputMgr.GetMenuButton(InputMgr.eMenuButton.SUBMIT) || m_submitTrigger;
        m_previousTrigger    = !InputMgr.GetMenuButton(InputMgr.eMenuButton.PREVIOUS) || m_previousTrigger;
        m_pauseTrigger       = !InputMgr.GetMenuButton(InputMgr.eMenuButton.PAUSE) || m_pauseTrigger;
        m_changeColorTrigger = !InputMgr.GetMenuButton(InputMgr.eMenuButton.CHANGE_COLOR) || m_changeColorTrigger;


        m_upTrigger    = !InputMgr.GetMenuButton(InputMgr.eMenuButton.UP) || m_upTrigger;
        m_downTrigger  = !InputMgr.GetMenuButton(InputMgr.eMenuButton.DOWN) || m_downTrigger;
        m_leftTrigger  = !InputMgr.GetMenuButton(InputMgr.eMenuButton.LEFT) || m_leftTrigger;
        m_rightTrigger = !InputMgr.GetMenuButton(InputMgr.eMenuButton.RIGHT) || m_rightTrigger;
    }
コード例 #19
0
    public override void Update()
    {
        for (int i = 0; i < 4; i++)
        {
            // reset triggers when button released
            m_submitTriggerList[i]      = !InputMgr.GetMenuButton(i + 1, InputMgr.eMenuButton.SUBMIT) || m_submitTriggerList[i];
            m_previousTriggerList[i]    = !InputMgr.GetMenuButton(i + 1, InputMgr.eMenuButton.PREVIOUS) || m_previousTriggerList[i];
            m_pauseTriggerList[i]       = !InputMgr.GetMenuButton(i + 1, InputMgr.eMenuButton.PAUSE) || m_pauseTriggerList[i];
            m_changeColorTriggerList[i] = !InputMgr.GetMenuButton(i + 1, InputMgr.eMenuButton.CHANGE_COLOR) || m_changeColorTriggerList[i];

            m_upTriggerList[i]    = !InputMgr.GetMenuButton(i + 1, InputMgr.eMenuButton.UP) || m_upTriggerList[i];
            m_downTriggerList[i]  = !InputMgr.GetMenuButton(i + 1, InputMgr.eMenuButton.DOWN) || m_downTriggerList[i];
            m_leftTriggerList[i]  = !InputMgr.GetMenuButton(i + 1, InputMgr.eMenuButton.LEFT) || m_leftTriggerList[i];
            m_rightTriggerList[i] = !InputMgr.GetMenuButton(i + 1, InputMgr.eMenuButton.RIGHT) || m_rightTriggerList[i];
        }
    }