Exemplo n.º 1
0
 private void UpdateBattleEmp(List <int> empList)
 {
     for (int j = 0; j < employeeBattleList.Count; j++)
     {
         employeeBattleList[j].SetActive(false);
     }
     for (int i = 0; i < empList.Count; i++)
     {
         EmployeeTaskBattleCell bCellUI = employeeBattleList[i].GetComponent <EmployeeTaskBattleCell>();
         bCellUI.EmployeeInstId = empList[i];
         employeeBattleList[i].SetActive(true);
     }
 }
Exemplo n.º 2
0
    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();
    }
Exemplo n.º 3
0
    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);
    }