public virtual void GainEnergyOnActivationStart() { currentEnergy += EntityLogic.GetTotalStamina(this); if (currentEnergy > currentMaxEnergy) { currentEnergy = currentMaxEnergy; } if (currentEnergy < 0) { currentEnergy = 0; } if (defender) { defender.UpdateEnergyBarPosition(); } }