private void PlanetOnDied(HealthAgentDeathArgs args) { Debug.Log($"PlanetOnDied: {args.Victim}"); //todo:get rid of view here var planet = (Planet)args.Victim; var explosion = _planetExplosionPool.Spawn(x => { x.transform.SetParent(transform); x.transform.position = planet.Position; }); Debug.Log($"Explode: {explosion.name}"); explosion.Explode(); explosion.Completed -= ExplosionOnCompleted; RemovePlanet(planet); CheckWinLoose(planet); }
protected virtual void OnDied(HealthAgentDeathArgs args) => Died?.Invoke(args);