Esempio n. 1
0
 public void finishTask(int taskId)
 {
     if (!_taskCacheData.finishTask(taskId))
     {
         throw new Exception("finishTask当前任务" + taskId + "还未开启,不能完成");
     }
     if (!_conditionMeetHelper.finishTask(taskId))
     {
         throw new Exception("finishTask当前任务" + taskId + "condition不匹配,不能完成");
     }
     _curTaskId = 0;
     _conditionMeetHelper.updateCondition(_taskCacheData.canConductTaskList);
     checkTaskUI();
 }
Esempio n. 2
0
 public void Init()
 {
     _curTaskId      = 0;
     _taskCacheData  = new MTBTaskCacheData();
     _stepController = new MTBTaskStepController();
     if (_taskCacheData.curStep != 0 && _taskCacheData.curConDuctTaskData != null)
     {
         _curTaskId = _taskCacheData.curConDuctTaskData.id;
         _stepController.curStepId = _taskCacheData.curStep;
     }
     _conditionMeetHelper = gameObject.AddComponent <MTBTaskCondtionMeetHelper>();
     _conditionMeetHelper.updateCondition(_taskCacheData.canConductTaskList);
     checkTaskUI();
 }