Ejemplo n.º 1
0
 void OnEventEnd(FEvent eve)
 {
     if (EventCenter.mEventTable.ContainsKey((data.helpTriggerEvent + endTaskBetween)))
     {
         EventCenter.RemoveListener <FEvent>((data.helpTriggerEvent + endTaskBetween), OnEventEnd);
     }
     if (taskEffect != null)
     {
         taskEffect.OnEnd();
     }
     taskEffect = null;
     if (isFinish)//如果任务已经提交则,真正完成此任务
     {
         OnEnd();
         return;
     }
     EventCenter.AddListener <FEvent>(data.helpTriggerEvent, OnEventStart);
 }
Ejemplo n.º 2
0
        public void Clean()
        {
            sTaskId   = 0;
            sTimes    = 0;
            sMathches = 0;
            data      = null;
            isFinish  = false;
            if (taskEffect != null)
            {
                taskEffect.OnEnd();
            }
            taskEffect = null;
            if (curCheckBase != null)
            {
                curCheckBase.OnEnd();
            }

            curCheckBase = null;
        }
Ejemplo n.º 3
0
 void OnEventStart(FEvent eve)
 {
     if (isFinish)
     {
         return;
     }
     if (data == null)
     {
         return;
     }
     if (EventCenter.mEventTable != null && EventCenter.mEventTable.ContainsKey(data.helpTriggerEvent))
     {
         EventCenter.RemoveListener <FEvent>(data.helpTriggerEvent, OnEventStart);
     }
     taskEffect = new SecondaryTaskEffect(this);
     taskEffect.OnEnter();
     sTimes += 1;
     if (sTimes >= data.helpTimes)
     {
         OnCommit(); //只是提交任务,但是显示效果可能还在继续
     }
     EventCenter.AddListener <FEvent>((data.helpTriggerEvent + endTaskBetween), OnEventEnd);
 }