public override void OnAdded() { this._state = State.Idle; this.shield = this.maxShield = base.actor.baseMaxHP * base.instancedAbility.Evaluate(this.config.ShieldHPRatio); this._betweenAttackResumeTimer.SetActive(true); this._forceResumeTimer.SetActive(false); this._minForceResumeTimer.SetActive(false); this._shieldResumeTimer.SetActive(false); base.actor.abilityPlugin.ApplyModifier(base.instancedAbility, this.config.ShieldOnModifierName); if (this._showShieldBar) { this._shieldDisplay = base.actor.abilityPlugin.CreateOrGetDisplayFloat("Shield", 0f, 1f, this.config.ShieldDisplayRatioCeiling); if (this._shieldDisplay.value < this.config.ShieldDisplayRatioCeiling) { this._state = State.Resuming; this._displayFloor = this._shieldDisplay.value; this._shieldResumeTimer.timespan = 0.3f; this._shieldResumeTimer.Reset(true); this._shieldResumeStart = 0f; this._shieldResumeTarget = this.maxShield; } else { this._displayFloor = this.config.ShieldDisplayRatioFloor; } } if (this.config.ControlledAbilityStates != null) { for (int i = 0; i < this.config.ControlledAbilityStates.Length; i++) { this._controlledAbilityState |= this.config.ControlledAbilityStates[i]; } } }
public override void OnAdded() { Singleton <EventManager> .Instance.RegisterEventListener <EvtAttackStart>(base.actor.runtimeID); this._animatorEntity.onCurrentSkillIDChanged = (Action <string, string>)Delegate.Combine(this._animatorEntity.onCurrentSkillIDChanged, new Action <string, string>(this.SkillIDChangedCallback)); this._isOverheatDisplay = base.actor.abilityPlugin.CreateOrGetDisplayFloat("IsOverheat", 0f, 1f, !this._isOverHeat ? 0f : 1f); this._overheatValueDisplay = base.actor.abilityPlugin.CreateOrGetDisplayFloat("OverheatRatio", 0f, 1f, this._heat / this.config.OverHeatMax); }
public override void OnAdded() { this._animatorEntity.onCurrentSkillIDChanged = (Action <string, string>)Delegate.Combine(this._animatorEntity.onCurrentSkillIDChanged, new Action <string, string>(this.SkillIDChangedCallback)); if (this.config.ShowStaminaBar) { this._staminaDisplay = base.actor.abilityPlugin.CreateOrGetDisplayFloat("Stamina", 0f, 1f, 1f); } }