public void OnEnergyReceivedCall() { OnEnergyReceived?.Invoke(GetEnergy()); }
public virtual void ReceiveEnergy(int amount, NetworkIdentity sender) { _componentData.ReceiveEnergy(amount, sender, this); OnEnergyReceived?.Invoke(GetEnergy()); }
public virtual void ReceiveEnergy(int amount) { _componentData.ReceiveEnergy(amount, GetOwner(), this); OnEnergyReceived?.Invoke(GetEnergy()); }
public void SetEnergy(int energy) { _energy = Math.Min(energy, _componentData.EnergyCap); OnEnergyReceived?.Invoke(GetEnergy()); }