private void OnFormationDie() { if (_enable) { Formation.Dispose(); Formation = CreateRandomFormation(); ManagerProvider.EventManager.CanGenerateNewWaveEvent.OnEvent(); } }
private void OnDestroy() { Formation.Dispose(); Formation = null; ManagerProvider.EventManager.FormationDieEvent.Unsubscribe(OnFormationDie); }
public void Initialize() { Formation = CreateRandomFormation(); Deactivate(); ManagerProvider.EventManager.FormationDieEvent.Subscribe(OnFormationDie); }