Example #1
0
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    //	* Derived Method: Update
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    void Update()
    {
        m_lPreviousInput = m_lCurrentInput;
        m_lCurrentInput  = new InputList();
        LinkedList <FrameInputInfo> lInputInfo = GetUpdatedInputInfo();

        foreach (FrameInputInfo input in lInputInfo)
        {
            if (input.hitObject != null)
            {
                ActiveInputButtons activeButton = m_lCurrentInput.GetOrNew(input.hitObject);
                activeButton.touchIDs.AddLast(input.inputID);
                if (input.triggered)
                {
                    activeButton.inputTriggered = true;
                }
            }
        }

        UpdateReleasedButtons();
        UpdateCurrentlyActiveButtons();
    }