Example #1
0
        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;
            }
        }
Example #2
0
        public void Disactivate()
        {
            if (activated)
            {
                activated = false;
                logfile.WriteLine("SpreadSearchPackCoordinatorWithSearchGrid shutting down");

                csai.UnregisterVoiceCommand("dumpsearchgrid");
            }
        }
Example #3
0
        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;
            }
        }