public void SetDice(DepControl dep) { CurrentPoint = 0; if (dep.SpTime > 0) { CurrentPoint += 5; } if (dep.EfficiencyLevel == 0) { RequirePoint = 20; } else if (dep.EfficiencyLevel == 1) { RequirePoint = 40; } else if (dep.EfficiencyLevel == 2) { RequirePoint = 80; } else if (dep.EfficiencyLevel == 3) { RequirePoint = 160; } else if (dep.EfficiencyLevel == 4) { RequirePoint = 320; } else if (dep.EfficiencyLevel == 5) { RequirePoint = 640; } if (GC.DoubleMobilizeCost > 0) { RequirePoint *= 2; } Text_Point.text = "当前点数:" + CurrentPoint + "\n下一级所需点数:" + RequirePoint; TargetDep = dep; ShowSkill(); for (int i = 0; i < dep.CurrentEmps.Count; i++) { for (int j = 0; j < dep.CurrentEmps[i].InfoDetail.SkillsInfo.Count; j++) { SkillInfo newSkill = Instantiate(SkillInfoPrefab, SkillSelectContent); newSkill.skill = dep.CurrentEmps[i].InfoDetail.SkillsInfo[j].skill; newSkill.SC = this; newSkill.empInfo = dep.CurrentEmps[i].InfoDetail; newSkill.UpdateUI(); newSkill.info = GC.infoPanel; TotalSkills.Add(newSkill); } } TotalValue = 0; RollButton.interactable = true; }
public void ClearPanel() { for (int i = 0; i < Dices.Count; i++) { Destroy(Dices[i].gameObject); } for (int i = 0; i < CurrentSkills.Count; i++) { CurrentSkills[i].skill.DiceExtra = 0; CurrentSkills[i].skill.StaminaExtra = 0; Destroy(CurrentSkills[i].gameObject); } for (int i = 0; i < TotalSkills.Count; i++) { TotalSkills[i].skill.DiceExtra = 0; TotalSkills[i].skill.StaminaExtra = 0; Destroy(TotalSkills[i].gameObject); } if (CurrentPoint >= RequirePoint) { if (TargetDep.EfficiencyLevel < 5) { TargetDep.EfficiencyLevel += 1; } TargetDep.Efficiency += 0.2f; TargetDep.LevelDownTime = 96; TargetDep.Text_LevelDownTime.text = "降级时间:" + TargetDep.LevelDownTime + "时"; if (GC.DoubleMobilizeCost > 0) { GC.DoubleMobilizeCost -= 1; } } Dices.Clear(); SelectedDices.Clear(); CurrentSkills.Clear(); TotalSkills.Clear(); CurrentPoint = 0; EventLimit = 0; TargetDep = null; Sp1Active = false; Sp2Multiply = 0; Sp3Multiply = 0; Sp4Multiply = 0; Sp5Multiply = 0; this.gameObject.SetActive(false); }