Esempio n. 1
0
 public void OnLongPress()
 {
     if (mLongTap != null)
     {
         mLongTap.HandlerCallback(this, null);
     }
 }
Esempio n. 2
0
    public void OnPress(bool isPressed)
    {
        if (mOnPressButtonHandler != null)
        {
            mOnPressButtonHandler(this, isPressed, m_HandlerParam1, m_HandlerParam2);
        }

        ////////////////////////////////////////////////////////////
        //new

        if (mOnPress != null)
        {
            mOnPress.HandlerCallback(this, isPressed);
        }

        if (isPressed)
        {
            if (mTouchDown != null)
            {
                mTouchDown.HandlerCallback(this, null);
            }
        }
        else
        {
            if (mTouchUp != null)
            {
                mTouchUp.HandlerCallback(this, null);
            }
        }
        ////////////////////////////////////////////////////////////
    }
Esempio n. 3
0
 public void OnDoubleClick()
 {
     if (mOnDoubleClick != null)
     {
         mOnDoubleClick.HandlerCallback(this, null);
     }
 }
Esempio n. 4
0
    public void OnClick()
    {
        if (Input.touchCount > 1)
        {
            return;
        }

        if (mOnTouchButtonHandler != null)
        {
            mOnTouchButtonHandler(this, null, m_HandlerParam1, m_HandlerParam2);
        }

        if (mOnClick != null)
        {
            if (GamePlayer.Instance.isInBattle && gameObject.CompareTag("DisableInBattle"))
            {
                //PopText.Instance.Show(LanguageManager.instance.GetValue("battlecannot"), PopText.WarningType.WT_Warning, true);
                return;
            }
            mOnClick.HandlerCallback(this, null);
            //2015-7-15 xiaoxiao add
            SoundTools.PlaySound(SOUND_ID.SOUND_BUTTONCLICK);
        }

        ////////////////////////////////////////////////////////////
    }
Esempio n. 5
0
    public void OnDrop(GameObject go)
    {
        if (mOnDropButtonHandler != null)
        {
            mOnDropButtonHandler(this, go, m_HandlerParam1, m_HandlerParam2);
        }

        ////////////////////////////////////////
        //new
        if (mOnDrop != null)
        {
            mOnDrop.HandlerCallback(this, go);
        }

        //////////////////////////////////////////
    }
Esempio n. 6
0
    public void OnClick()
    {
        if (mOnTouchButtonHandler != null)
        {
            mOnTouchButtonHandler(this, null, m_HandlerParam1, m_HandlerParam2);
        }

        Toggle checkbox = GetComponent <Toggle>();

        if (checkbox != null)
        {
            if (checkbox.isOn)
            {
                if (mCheckOnButtonHandler != null)
                {
                    mCheckOnButtonHandler(this, null, m_HandlerParam1, m_HandlerParam2);
                }
            }
            else
            {
                if (mCheckOffButtonHandler != null)
                {
                    mCheckOffButtonHandler(this, null, m_HandlerParam1, m_HandlerParam2);
                }
            }
        }

        ////////////////////////////////////////////////////////////
        //new
        if (mOnClick != null)
        {
            //	AudioManager.Instance.PlayGameAudio( 10002012 );
            mOnClick.HandlerCallback(this, null);
        }

        if (mOnClick4Tab != null)
        {
            //	AudioManager.Instance.PlayGameAudio( 10002018 );
            mOnClick4Tab.HandlerCallback(this, null);
        }


        //UIToggle checkbox = GetComponent<UIToggle>();
        if (checkbox != null)
        {
            if (checkbox.isOn)
            {
                if (mCheckOn != null)
                {
                    mCheckOn.HandlerCallback(this, null);
                }
            }
            else
            {
                if (mCheckOff != null)
                {
                    mCheckOff.HandlerCallback(this, null);
                }
            }
        }

        ////////////////////////////////////////////////////////////
    }