Пример #1
0
 public override void Exit()
 {
     inst = null;
     ClientEventMgr.GetInstance().UnsubscribeClientEvent((int)ClientEvent.EC_ACTOR_ADD_UNDER_ATTACK, OnAddUnderAttackActor);
     if (mTimer != null)
     {
         mTimer.Destroy();
         mTimer = null;
     }
 }
Пример #2
0
        private float mResetInterval       = 5;  //自动重置列表目标的时长(秒)
        public override void Enter(params object[] param)
        {
            inst           = this;
            mCurShowObjIdx = 0;
            mDataArray.Clear();
            mNoAttackInterval = GameConstHelper.GetFloat("GAME_BATTLE_HOSTILE_NO_ATTACK_TIME");
            mResetInterval    = GameConstHelper.GetFloat("GAME_BATTLE_HOSTILE_RESET_TIME");
            ClientEventMgr.GetInstance().SubscribeClientEvent((int)ClientEvent.EC_ACTOR_ADD_UNDER_ATTACK, OnAddUnderAttackActor);

            if (mTimer != null)
            {
                mTimer.Destroy();
                mTimer = null;
            }
        }