コード例 #1
0
        void btnUse(GameObject obj)
        {
            EngineCoreEvents.AudioEvents.PlayAudio.SafeInvoke(Audio.AudioType.UISound, EngineCommonAudioKey.Button_Click_Common.ToString());

            PropInfoTypeEnum tempTypeEnum = m_currentInfo_enum;

            if (tempTypeEnum == PropInfoTypeEnum.None)
            {
                tempTypeEnum = PropInfoTypeEnum.Use;
            }
            BagUseData d = new BagUseData(m_curPropData, tempTypeEnum);

            BagUseDialogHelper.EnterBagUseDialog(d);
        }
コード例 #2
0
 public override void OnHide()
 {
     base.OnHide();
     GameEvents.Skill_Event.OnSkillFinish -= OnSkillFinish;
     MessageHandler.UnRegisterMessageHandler(MessageDefine.PlayerPropSellResposne, OnRes);
     MessageHandler.UnRegisterMessageHandler(MessageDefine.SCDropResp, OnRes);
     m_curNum  = 1;
     m_bagData = null;
     m_addNum_btn.RemoveLongClickCallBack(OnAddNum);
     m_reduceNum_btn.RemoveLongClickCallBack(OnReduce);
     m_maxNum_btn.RemoveClickCallBack(OnMax);
     m_yes_btn.RemoveClickCallBack(OnSure);
     m_close_btn.RemoveClickCallBack(OnClose);
 }
コード例 #3
0
 public override void OnShow(object param)
 {
     base.OnShow(param);
     GameEvents.Skill_Event.OnSkillFinish += OnSkillFinish;
     MessageHandler.RegisterMessageHandler(MessageDefine.PlayerPropSellResposne, OnRes);
     MessageHandler.RegisterMessageHandler(MessageDefine.SCDropResp, OnRes);
     if (param is BagUseData)
     {
         m_bagData = param as BagUseData;
     }
     InitEventListener();
     InitDialog();
     CheckState();
     //for (int i = 0; i < this.tweener.Length; i++)
     //{
     //    this.tweener[i].ResetAndPlay();
     //}
 }