예제 #1
0
        public void OnStart()
        {
            snapshot = new StateSnapshot();
            snapshot.UpdateState(intelManager);

            activeTactics = new List <IReplaceableModule>();

            economyModule = new EconomyModule(snapshot, intelManager, productionManager, combatManager, rawManager);
            abathur.AddToGameloop(economyModule);

            intelManager.Handler.RegisterHandler(Case.StructureAddedSelf, OnStructureBuilt);

            // Startup Queue
            productionManager.QueueUnit(BlizzardConstants.Unit.SCV, lowPriority: false);
            productionManager.QueueUnit(BlizzardConstants.Unit.SCV, lowPriority: false);
            productionManager.QueueUnit(BlizzardConstants.Unit.SupplyDepot, lowPriority: false, spacing: 1);
            productionManager.QueueUnit(BlizzardConstants.Unit.Refinery, lowPriority: false);
            productionManager.QueueUnit(BlizzardConstants.Unit.SCV, lowPriority: false);
            productionManager.QueueUnit(BlizzardConstants.Unit.Barracks, lowPriority: false, spacing: 3);
            productionManager.QueueUnit(BlizzardConstants.Unit.SupplyDepot, lowPriority: true, spacing: 1);
            productionManager.QueueUnit(BlizzardConstants.Unit.SCV, lowPriority: false);
            productionManager.QueueUnit(BlizzardConstants.Unit.BarracksTechLab, lowPriority: false);
            productionManager.QueueUnit(BlizzardConstants.Unit.SCV, lowPriority: false);
            productionManager.QueueUnit(BlizzardConstants.Unit.SCV, lowPriority: false);
            productionManager.QueueUnit(BlizzardConstants.Unit.Barracks, lowPriority: false, spacing: 3);
            productionManager.QueueUnit(BlizzardConstants.Unit.SCV, lowPriority: false);
            productionManager.QueueUnit(BlizzardConstants.Unit.BarracksReactor, lowPriority: false);
            productionManager.QueueTech(BlizzardConstants.Research.CombatShield, lowPriority: false);
            productionManager.QueueUnit(BlizzardConstants.Unit.SCV, lowPriority: true);
            productionManager.QueueUnit(BlizzardConstants.Unit.SCV, lowPriority: true);
            productionManager.QueueUnit(BlizzardConstants.Unit.SCV, lowPriority: true);
        }
예제 #2
0
        // Detect the race on initialize and add the correct module
        public void OnStart()
        {
            switch (_intel.ParticipantRace)
            {
            case NydusNetwork.API.Protocol.Race.NoRace:
                break;

            case NydusNetwork.API.Protocol.Race.Terran:
                _abathur.AddToGameloop(_terranModule);
                _added = true;
                break;

            case NydusNetwork.API.Protocol.Race.Zerg:
                _abathur.AddToGameloop(_zergModule);
                _added = true;
                break;

            case NydusNetwork.API.Protocol.Race.Protoss:
                _abathur.AddToGameloop(_protossModule);
                _added = true;
                break;

            case NydusNetwork.API.Protocol.Race.Random:
                break;
            }
        }
예제 #3
0
        /// <summary>
        /// Detect the which race we are and inject the corrects strategy.
        /// </summary>
        public void OnStart()
        {
            switch (GameConstants.ParticipantRace)
            {
            case NydusNetwork.API.Protocol.Race.NoRace:
                break;

            case NydusNetwork.API.Protocol.Race.Terran:
                _abathur.AddToGameloop(_terranModule);
                break;

            case NydusNetwork.API.Protocol.Race.Zerg:
                _abathur.AddToGameloop(_zergModule);
                break;

            case NydusNetwork.API.Protocol.Race.Protoss:
                _abathur.AddToGameloop(_protossModule);
                break;

            case NydusNetwork.API.Protocol.Race.Random:
                _log.LogError("RandomDemo: Race could not be detected --- nothing was added");
                break;
            }
        }