private void OnDisable() { // EnergyJobHandle.Complete(); ChargeCountJobHandle.Complete(); Hub.ChargingBatteryCounts.Dispose(); Battery.AllData.Dispose(); _droneInfo.Dispose(); _dronesToDrop.Dispose(); _instance = null; }
public static BatteryManager New() { _instance = new GameObject("BatteryManager").AddComponent <BatteryManager>(); return(_instance); }