public void Disactivate() { if (Active) { csai.UnitIdleEvent -= new CSAI.UnitIdleHandler(UnitIdle); csai.TickEvent -= new CSAI.TickHandler(Tick); csai.UnitMoveFailedEvent -= new CSAI.UnitMoveFailedHandler(UnitMoveFailed); csai.UnregisterVoiceCommand("constructorshownextbuildsiteon"); csai.UnregisterVoiceCommand("constructorshownextbuildsiteoff"); unitcontroller.UnitAddedEvent -= new UnitController.UnitAddedHandler(UnitAdded); unitcontroller.UnitRemovedEvent -= new UnitController.UnitRemovedHandler(UnitRemoved); Active = false; } }
public void Disactivate() { if (activated) { activated = false; logfile.WriteLine("SpreadSearchPackCoordinatorWithSearchGrid shutting down"); csai.UnregisterVoiceCommand("dumpsearchgrid"); } }
public void Disactivate() { if (Active) { enemycontroller.NewEnemyAddedEvent -= new EnemyController.NewEnemyAddedHandler(EnemyAdded); enemycontroller.EnemyRemovedEvent -= new EnemyController.EnemyRemovedHandler(EnemyRemoved); csai.TickEvent -= new CSAI.TickHandler(Tick); csai.UnregisterVoiceCommand("tankscount"); csai.UnregisterVoiceCommand("tanksmoveto"); csai.UnregisterVoiceCommand("tanksattackpos"); unitcontroller.UnitAddedEvent -= new UnitController.UnitAddedHandler(UnitAdded); unitcontroller.UnitRemovedEvent -= new UnitController.UnitRemovedHandler(UnitRemoved); packcoordinatorselector.DisactivateAll(); Active = false; } }
public void Disactivate() { if (Active) { csai.TickEvent -= new CSAI.TickHandler(Tick); csai.UnregisterVoiceCommand("countscouts"); unitcontroller.UnitAddedEvent -= new UnitController.UnitAddedHandler(UnitAdded); unitcontroller.UnitRemovedEvent -= new UnitController.UnitRemovedHandler(UnitRemoved); searchcoordinator.Disactivate(); Active = false; } }