using ScriptableObjectArchitecture; namespace GameDev.CoreSystems { public interface IPowerSystem { /// /// This entity generates power /// public bool IsGenerator { get; } /// /// This entity consumes power /// public bool IsConsumer { get; } /// /// True if consumer demand exceed generator capacity /// public BoolReference PowerLost { get; set; } /// /// Initialize the power configuration of the entity with the /// /// Power config for the entity public void Initialize(SoPowerConfig config); /// /// Max power for the entity /// Generator capacity or max consumption depending on /// the set type or /// /// public void SetMaxPower(int newMaxPowerValue); /// /// Current power for the entity /// /// current power generated/consumed power for this entity [W] public void SetCurrentPower(int newCurrentPowerValue); /// /// Get Max power for the entity /// Generator capacity or max consumption depending on /// the set type or /// /// The max power that can be generated/consumed by this entity [W] public int GetMaxPower(); /// /// Get current power for the entity. /// /// The power generated/consumed by this entity right now [W] public int GetCurrentPower(); /// /// Get the power factor for the entity /// /// The ratio between current power and max power [factor] public float GetPowerFactor(); } }