public override void SetTask(Package.Task task, bool isRecycle = true) { base.SetTask(task, isRecycle); this.IsCollecting = false; this.InitCollect(); this.RefreshCollect(); }
private void RefreshDescUI(Package.Task data = null) { if (!base.get_gameObject().get_activeInHierarchy()) { return; } if (MainTaskManager.Instance.CurTaskId != TaskDescUI.OpenByTaskId) { return; } this.HideGuideTips(); BaseTask task = MainTaskManager.Instance.GetTask(TaskDescUI.OpenByTaskId, true); if (task != null) { if (data != null && (task.Data.quickReceive == 1 || task.Data.quickComplete == 1)) { this.Show(false); } else { this.RefreshReward(task); this.RefreshInfo(task); } } }
public virtual void SetTask(Package.Task task, bool isRecycle = true) { if (isRecycle) { this.IsActive = true; } this.Task = task; }
public BaseTask(Package.Task task) { if (task != null && task.taskId > 0) { this.SetData(task); this.SetTask(task, true); this.AddListeners(); } }
private void OnRefreshNpc(Package.Task task) { if (this.IsActive && task != null && task.taskId == base.Task.taskId && task.taskType == Package.Task.TaskType.MainTask && task.status == Package.Task.TaskStatus.TaskReceived) { TaskNPCManager.Instance.UpdateNPC(this.mBeginNpc, new NPCInformation { id = this.mBeginNpc, position = Vector3.get_zero(), status = NPCStatus.FOLLOW }); } }
protected virtual void SetData(Package.Task task) { this.Data = DataReader <RenWuPeiZhi> .Get(task.taskId); if (this.Data != null && this.Data.target != null && this.Data.target.get_Count() > 0) { this.Targets = this.Data.target; } else { Debug.LogError(string.Format("任务[{0}]目标配表有误!!!", task.taskId)); } }
public ProtectTask(Package.Task task) : base(task) { if (base.Data != null && base.Targets != null) { if (base.Targets.get_Count() > 1) { this.mBeginNpc = base.Targets.get_Item(0); this.mEndNpc = base.Targets.get_Item(1); } else { Debug.LogError(string.Format("护送任务[{0}]配置参数[{1}]有误!", base.Data.id, base.Data.target)); } } }
private void RefreshUI(Package.Task task) { if (task != null && this.mTask != null && this.mTask.Task != null && this.mTask.Task.taskId == task.taskId) { this.mTask.SetTask(task, false); this.SetData(this.mTask); if (this.mIsTop) { this.SetGuide(); } else { this.HideGuide(); } } }
protected override void SetData(Package.Task task) { base.SetData(task); if (base.Data != null) { this.mGoodsList.Clear(); if (base.Targets != null && base.Targets.get_Count() > 0) { for (int i = 0; i < base.Targets.get_Count(); i++) { CaiJiPeiZhi caiJiPeiZhi = DataReader <CaiJiPeiZhi> .Get(base.Targets.get_Item(i)); if (caiJiPeiZhi != null) { this.mGoodsList.Add(caiJiPeiZhi); } } } else { Debug.LogError(string.Format("驯服任务[{0}]配置参数[{1}]有误!", base.Data.id, base.Data.target)); } } }
public FightTask(Package.Task task) : base(task) { }
public CollectTask(Package.Task task) : base(task) { }
private void RefreshTaskList(Package.Task task = null) { this.CheckTaskGroupState(MainTaskManager.Instance.ZeroTaskId); this.CreateTaskList(MainTaskManager.Instance.ZeroTaskId); }
public TameTask(Package.Task task) : base(task) { }