public void AddBattery(BatteryController battery) { batteries.Add(battery); onBatterySpawned?.Invoke(battery); }
private void OnBatterySpawned(BatteryController battery) { battery.HealthChanged += OnBatteryHealthChanged; batteries.Add(battery); UpdateBatteriesGoal(); }