Beispiel #1
0
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    //	* New Method: On Touch Release
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    protected virtual void OnTouchRelease()
    {
        // If touch was released quick enough to be considered a quick little tap (ie. you weren't intending on moving the page at all)
        if (m_fHeldTimer < m_fTapWindow && CanSingleTap)
        {
            WasSingleTapped = true;

            // If large page, make it small
            if (IsLarge)
            {
                OnDoubleTap();
            }

            // Otherwise if already small page, make it disappear
            else
            {
                if (m_rSubsceneToHide != null)
                {
                    m_rSubsceneToHide.HideSubscene();
                }
                else
                {
                    this.GetComponent <ObjectTransitionAnimation>().Disappear(false);
                }
            }
        }

        // Otherwise check to see that the page is not out of bounds and needs to be reset.
        else
        {
            CheckLimit();
            ToggleTouchObjects(true);
        }

        m_bIsTouched = false;
        m_fHeldTimer = 0.0f;
    }
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //	* New Method: On Button Available Clicked
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 private void OnButtonAvailableClicked()
 {
     m_rChallengeManager.CurrentChallengeID = (int)m_eChallengeID;
     m_rChallengeSelectorSubsceneManager.HideSubscene();
     m_rChallengeGameTransitioner.Reveal(false);
 }