public void UpdateTaskInst(COM_EmployeeQuestInst inst) { for (int i = 0; i < _questlist.Count; i++) { if (_questlist[i].questId_ == inst.questId_) { _questlist[i] = inst; break; } } if (UpdaEmployeeTaskEnven != null) { UpdaEmployeeTaskEnven(inst); } SetTaskTime(); }
public void UpdateInfo(COM_EmployeeQuestInst inst) { if (inst == null) { return; } if (inst.status_ == EmployeeQuestStatus.EQS_None) { startObj.gameObject.SetActive(true); submitObj.gameObject.SetActive(false); runingObj.gameObject.SetActive(false); } else if (inst.status_ == EmployeeQuestStatus.EQS_Running) { startObj.gameObject.SetActive(false); submitObj.gameObject.SetActive(false); runingObj.gameObject.SetActive(true); } else { startObj.gameObject.SetActive(false); submitObj.gameObject.SetActive(true); runingObj.gameObject.SetActive(false); } for (int j = 0; j < employeeBattleList.Count; j++) { employeeBattleList[j].SetActive(false); } empTaskList.Clear(); for (int i = 0; i < inst.usedEmployees_.Length; i++) { if (inst.usedEmployees_[i] != 0) { EmployeeTaskBattleCell bCellUI = employeeBattleList[i].GetComponent <EmployeeTaskBattleCell>(); bCellUI.EmployeeInstId = inst.usedEmployees_[i]; employeeBattleList[i].SetActive(true); empTaskList.Add(inst.usedEmployees_[i]); } } SetSuccessRate(inst.questId_, empTaskList); UpdateEmpList(); }
private void OnEmpOff(ButtonScript obj, object args, int param1, int param2) { COM_EmployeeQuestInst inst = EmployeeTaskSystem.instance.GetTaskInst(_taskId); if (inst.status_ == EmployeeQuestStatus.EQS_Running || inst.status_ == EmployeeQuestStatus.EQS_Complate) { return; } EmployeeTaskBattleCell bCellUI = obj.gameObject.GetComponent <EmployeeTaskBattleCell>(); if (empTaskList.Contains(bCellUI.EmployeeInstId)) { empTaskList.Remove(bCellUI.EmployeeInstId); } UpdateBattleEmp(empTaskList); SetSuccessRate(TaskId, empTaskList); }
void OnUpdateList(COM_EmployeeQuestInst inst) { updateTaskList(selecttype_); empNum.text = (GamePlayer.Instance.EmployeeList.Count - GamePlayer.Instance.GetBattleEmployees().Count - EmployeeTaskSystem.instance.GetTaskEmpNum()) + "/" + GamePlayer.Instance.EmployeeList.Count; }