public float GetSkillSPNeed(string skillName) { float num = 0f; if ((!(skillName == "SKL01") && !(skillName == "SKL02")) && !(skillName == "SKL_WEAPON")) { return(num); } SKillInfo info = this._skillInfoMap[skillName]; return(Mathf.Max((float)info.costSP, (float)info.needSP)); }
public override void Core() { base.Core(); if (!this._allowOtherCanSwithInWhenSelfOnStage) { this._switchInTimer.Core(1f); } if (base.isAlive != 0) { MonoLevelEntity levelEntity = Singleton <LevelManager> .Instance.levelEntity; for (int i = 0; i < this.skillInfoList.Count; i++) { SKillInfo info = this.skillInfoList[i]; if (info.cdTimer >= 0f) { info.cdTimer -= levelEntity.TimeScale * Time.deltaTime; if (info.cdTimer < 0f) { info.cdTimer = -253f; } if ((info.cdTimer == -253f) && (info.MaxChargesCount > 0)) { int chargesCounter = (int)info.chargesCounter; int num3 = Mathf.Clamp(chargesCounter + 1, 0, (int)info.MaxChargesCount); info.chargesCounter = num3; if (this.onSkillChargeChanged != null) { this.onSkillChargeChanged(info.skillName, chargesCounter, num3); } if (info.chargesCounter < info.MaxChargesCount) { info.cdTimer = this.GetSkillCD(info.skillName); } } } } this.UpdateAbilityState(); } }