public void refreshBtnState() { Debug.Log("Refresh This SKill:" + this.name + " State"); bool btnEnable = true; #region 该技能存在使用次数限制 if (SkillFiniteTimes > 0) { if (SFT_CurrentTimes >= SkillFiniteTimes) { btnEnable = false; } //显示当前剩余次数 } #endregion BattleRoleData Unit = BM._currentBattleUnit; OneRoleClassData R = Unit.ThisBasicRoleProperty()._role; RoleBarChart CurrentBC = R.ReadAllMaxSSD; #region 该技能消耗超过角色现有量 bool flag = CheckIfCanConsume(Unit); if (!flag) { btnEnable = false; } #endregion #region 角色状态影响技能 if (Unit.checkPerState(StateTag.Hush)) { if (this is NormalAttack) { btnEnable = true; } else { btnEnable = false; } } #endregion SkillDisable = !btnEnable; if (!btnEnable)//显示技能是否可以继续使用 { _btn.interactable = false; } else { _btn.interactable = true; } }