示例#1
0
        public FourGate(BuildOptions buildOptions, MacroData macroData, ActiveUnitData activeUnitData, AttackData attackData, ChatService chatService, ChronoData chronoData, SharkyUnitData sharkyUnitData, ICounterTransitioner counterTransitioner, UnitCountService unitCountService, MicroTaskData microTaskData)
            : base(buildOptions, macroData, activeUnitData, attackData, chatService, chronoData, counterTransitioner, unitCountService, microTaskData)
        {
            SharkyUnitData = sharkyUnitData;

            OpeningAttackChatSent = false;
        }
示例#2
0
        static void Main(string[] args)
        {
            try
            {
                // Read the meta data of the template given by the first argument.
                string           templatePath = Path.Combine("Template", args[0]);
                TemplateMetaData template     = TemplateMetaData.ReadFromXml(Path.Combine(templatePath, "Template.xml"));

                // Read the macro values from the file given by the second argument.
                List <MacroData> macroDataList = MacroData.ReadFromXml(args[1]);

                // Fill the value fields in the macro definitions with the macro values.
                foreach (MacroData macroData in macroDataList)
                {
                    foreach (MacroDefinition macroDefinition in template.MacroDefinitions)
                    {
                        if (macroDefinition.Type == MacroType.UserString && macroDefinition.Name == macroData.Name)
                        {
                            macroDefinition.Value = macroData.Value;
                        }
                    }
                }

                // Create the target in the folder given by the third argument.
                string templateContentPath = Path.Combine(templatePath, "Content");
                TargetCreation.TargetCreator.CreateTarget(templateContentPath, template.MacroDefinitions, args[2]);

                Console.WriteLine("Target successfully created!");
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
        } // Main
        private void maction_Click(object sender, EventArgs e)
        {
            TreeNode  node;
            MacroData data;

            if (mtree.SelectedNode == null)
            {
                return;
            }

            if (mtree.SelectedNode.Parent != null)
            {
                return;
            }

            node = mtree.SelectedNode.Nodes.Add("Action");
            mtree.ExpandAll();
            mtree.Focus();

            data       = new MacroData();
            data.batch = 0;
            data.type  = ActionBrowserForm.BrowseAction(this, action.Value);
            data.tag   = 0;

            node.Text = data.SetName();
            node.Tag  = data;
        }
示例#4
0
        void SetupTech(MacroData macroData)
        {
            macroData.DesiredTechCounts = new Dictionary <UnitTypes, int>();
            macroData.BuildTech         = new Dictionary <UnitTypes, bool>();

            if (macroData.Race == Race.Protoss)
            {
                macroData.Tech = new List <UnitTypes> {
                    UnitTypes.PROTOSS_CYBERNETICSCORE, UnitTypes.PROTOSS_FORGE, UnitTypes.PROTOSS_ROBOTICSBAY, UnitTypes.PROTOSS_TWILIGHTCOUNCIL, UnitTypes.PROTOSS_FLEETBEACON, UnitTypes.PROTOSS_TEMPLARARCHIVE, UnitTypes.PROTOSS_DARKSHRINE
                };
            }
            else if (macroData.Race == Race.Terran)
            {
                macroData.Tech = new List <UnitTypes> {
                    UnitTypes.TERRAN_ENGINEERINGBAY, UnitTypes.TERRAN_GHOSTACADEMY, UnitTypes.TERRAN_ARMORY, UnitTypes.TERRAN_FUSIONCORE
                };
            }
            else
            {
                macroData.Tech = new List <UnitTypes> {
                    UnitTypes.ZERG_SPAWNINGPOOL, UnitTypes.ZERG_ROACHWARREN, UnitTypes.ZERG_BANELINGNEST, UnitTypes.ZERG_EVOLUTIONCHAMBER, UnitTypes.ZERG_INFESTATIONPIT, UnitTypes.ZERG_HYDRALISKDEN, UnitTypes.ZERG_LURKERDENMP, UnitTypes.ZERG_ULTRALISKCAVERN, UnitTypes.ZERG_SPIRE
                };
            }

            foreach (var techType in macroData.Tech)
            {
                macroData.DesiredTechCounts[techType] = 0;
                macroData.BuildTech[techType]         = false;
            }
        }
示例#5
0
        /// <summary>
        /// Preloads data of a macro from a file. Returns the type name of the loaded macro on success.
        /// </summary>
        /// <param name="fileName">the name of the file</param>
        /// <returns>the typename of the macro if loading was successful</returns>
        public string LoadMacro(string fileName)
        {
            fileName = Application.StartupPath + @"\Macros\" + Path.GetFileName(fileName);
            if (File.Exists(fileName) == false)
            {
                return(String.Empty);
            }
            MacroData macroData = MacroSerializer.DeserializeMacro(fileName);

            if (m_Data.ContainsKey(macroData.Name))
            {
                m_Data.Remove(macroData.Name);
            }
            if (m_FileNames.ContainsKey(macroData.Name))
            {
                m_FileNames.Remove(macroData.Name);
            }
            m_FileNames.Add(macroData.Name, fileName);
            m_Data.Add(macroData.Name, macroData);
            if (m_Macros.ContainsKey(macroData.Name))
            {
                //if it's already present, replace it with the new one
                m_Macros.Remove(macroData.Name);
                m_Symbols.Remove(macroData.Name);
            }
            //Macro macro = new Macro(CircuitConverter.Instance.ConvertToCircuit(macroData.Circuit), macroData.Matching);
            //macro.FileReference = Path.GetFileName(fileName);
            //macro.TypeName = macroData.Name;
            //m_Macros.Add(macroData.Name, macro);
            //m_Symbols.Add(macroData.Name, SymbolConverter.Instance.ConvertToSymbol(macroData.Symbol));
            return(macroData.Name);
        }
示例#6
0
        void SetupMorphs(MacroData macroData)
        {
            macroData.DesiredMorphCounts = new Dictionary <UnitTypes, int>();
            macroData.Morph = new Dictionary <UnitTypes, bool>();
            if (macroData.Race == Race.Protoss)
            {
                macroData.Morphs = new List <UnitTypes>();
            }
            else if (macroData.Race == Race.Terran)
            {
                macroData.Morphs = new List <UnitTypes> {
                    UnitTypes.TERRAN_ORBITALCOMMAND, UnitTypes.TERRAN_PLANETARYFORTRESS
                };
            }
            else
            {
                macroData.Morphs = new List <UnitTypes> {
                    UnitTypes.ZERG_LAIR, UnitTypes.ZERG_HIVE, UnitTypes.ZERG_GREATERSPIRE
                };
            }

            foreach (var productionType in macroData.Morphs)
            {
                macroData.DesiredMorphCounts[productionType] = 0;
                macroData.Morph[productionType] = false;
            }
        }
示例#7
0
        public MacroManager(MacroSetup macroSetup, ActiveUnitData activeUnitData, SharkyUnitData sharkyUnitData, IBuildingBuilder buildingBuilder, SharkyOptions sharkyOptions, BaseData baseData, TargetingData targetingData, AttackData attackData, IBuildingPlacement warpInPlacement, MacroData macroData, Morpher morpher, BuildOptions buildOptions,
                            BuildPylonService buildPylonService, BuildDefenseService buildDefenseService, BuildProxyService buildProxyService, UnitCountService unitCountService, BuildingCancelService buildingCancelService)
        {
            MacroSetup      = macroSetup;
            ActiveUnitData  = activeUnitData;
            SharkyUnitData  = sharkyUnitData;
            BuildingBuilder = buildingBuilder;
            SharkyOptions   = sharkyOptions;
            BaseData        = baseData;
            TargetingData   = targetingData;
            AttackData      = attackData;
            WarpInPlacement = warpInPlacement;

            MacroData    = macroData;
            Morpher      = morpher;
            BuildOptions = buildOptions;

            BuildPylonService     = buildPylonService;
            BuildDefenseService   = buildDefenseService;
            BuildProxyService     = buildProxyService;
            UnitCountService      = unitCountService;
            BuildingCancelService = buildingCancelService;

            MacroData.DesiredUpgrades = new Dictionary <Upgrades, bool>();

            LastRunFrame = -10;
            RunFrequency = 5;
        }
示例#8
0
        public WallOffTest(BuildOptions buildOptions, MacroData macroData, ActiveUnitData activeUnitData, AttackData attackData, ChatService chatService, ChronoData chronoData, MicroTaskData microTaskData,
                           ICounterTransitioner counterTransitioner, UnitCountService unitCountService)
            : base(buildOptions, macroData, activeUnitData, attackData, chatService, chronoData, counterTransitioner, unitCountService, microTaskData)
        {
            MicroTaskData = microTaskData;

            WallOffStarted = false;
        }
示例#9
0
        public ReaperCheese(BuildOptions buildOptions, MacroData macroData, ActiveUnitData activeUnitData, AttackData attackData, ChatService chatService, MicroTaskData microTaskData, UnitCountService unitCountService, SharkyUnitData sharkyUnitData, ProxyLocationService proxyLocationService, DebugService debugService, IIndividualMicroController scvMicroController) : base(buildOptions, macroData, activeUnitData, attackData, chatService, unitCountService)
        {
            MicroTaskData        = microTaskData;
            ProxyLocationService = proxyLocationService;

            OpeningAttackChatSent = false;
            ProxyTask             = new ProxyTask(sharkyUnitData, false, 0.9f, MacroData, string.Empty, MicroTaskData, debugService, scvMicroController);
            ProxyTask.ProxyName   = GetType().Name;
        }
示例#10
0
        } // mainForm_Load

        /// <summary>
        /// Called when the user clicks the File/Load menu item. Displays aa file open dialog and loads the user macro data from the chosen
        /// xml file. The string MacroDataFileSpec is set to the spec. The data is then displayed in the macro list view, overwriting data
        /// that is already there.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void menuFileLoad_Click(object sender, EventArgs e)
        {
            // Since the loaded values will overwrite the current values, warn the user.
            if (MessageBox.Show(
                    "Loaded user macro values will overwrite the current values. Continue?",
                    "Warning",
                    MessageBoxButtons.YesNo) == DialogResult.No)
            {
                return;
            }

            OpenFileDialog dlg = new OpenFileDialog();

            dlg.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
            dlg.Filter           = "xml files (*.xml)|*.xml";
            dlg.RestoreDirectory = true;

            if (dlg.ShowDialog() != DialogResult.OK)
            {
                return;
            }

            // Load the user supplied macro data from the xml file.
            MacroDataFileSpec = dlg.FileName;
            List <MacroData> macroDataList = null;

            try
            {
                macroDataList = MacroData.ReadFromXml(MacroDataFileSpec);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
                return;
            }

            // Fill value fields in the macro definitions. This overwrites the current values.
            foreach (MacroData macroData in macroDataList)
            {
                foreach (MacroDefinition macroDefinition in Template.MacroDefinitions)
                {
                    if (macroDefinition.Type == MacroType.UserString && macroDefinition.Name == macroData.Name)
                    {
                        macroDefinition.Value = macroData.Value;
                    }
                }
            }

            // Display the value data in the macro list view.
            for (int ind = 0; ind < Template.MacroDefinitions.Count; ind++)
            {
                if (Template.MacroDefinitions[ind].Type == MacroType.UserString)
                {
                    listViewMacros.Items[ind].SubItems[1].Text = Template.MacroDefinitions[ind].Value;
                }
            }
        } // menuFileLoad_Click
示例#11
0
 public MacroBalancer(BuildOptions buildOptions, ActiveUnitData activeUnitData, MacroData macroData, SharkyUnitData sharkyUnitData, BaseData baseData, UnitCountService unitCountService)
 {
     BuildOptions     = buildOptions;
     ActiveUnitData   = activeUnitData;
     MacroData        = macroData;
     SharkyUnitData   = sharkyUnitData;
     BaseData         = baseData;
     UnitCountService = unitCountService;
 }
示例#12
0
 public SharkyBuild(DefaultSharkyBot defaultSharkyBot)
 {
     BuildOptions     = defaultSharkyBot.BuildOptions;
     MacroData        = defaultSharkyBot.MacroData;
     ActiveUnitData   = defaultSharkyBot.ActiveUnitData;
     AttackData       = defaultSharkyBot.AttackData;
     ChatService      = defaultSharkyBot.ChatService;
     UnitCountService = defaultSharkyBot.UnitCountService;
     MicroTaskData    = defaultSharkyBot.MicroTaskData;
 }
示例#13
0
            public AudioSessionsMacroElement(AudioSessionsLayout audioSelectLayout, int macroId) : base(new Identifier($"ButtonValue.Macro.{macroId}"))
            {
                _audioSelectLayout = audioSelectLayout;
                _macroId           = macroId;

                if (!_audioSelectLayout._macroData.TryGetValue(macroId, out _macroData))
                {
                    _macroData = new MacroData();
                    _audioSelectLayout._macroData[macroId] = _macroData;
                }
            }
示例#14
0
        public void SetupMacro(MacroData macroData)
        {
            SetupUnits(macroData);
            SetupProduction(macroData);
            SetupMorphs(macroData);
            SetupTech(macroData);
            SetupAddOns(macroData);
            SetupDefensiveBuildings(macroData);

            macroData.Proxies = new Dictionary <string, ProxyData>();
        }
示例#15
0
        public BuildProxyService(MacroData macroData, IBuildingBuilder buildingBuilder, SharkyUnitData sharkyUnitData, ActiveUnitData activeUnitData, Morpher morpher, MicroTaskData microTaskData)
        {
            MacroData       = macroData;
            BuildingBuilder = buildingBuilder;
            SharkyUnitData  = sharkyUnitData;
            ActiveUnitData  = activeUnitData;
            Morpher         = morpher;
            MicroTaskData   = microTaskData;

            lastFailFrame = 0;
        }
示例#16
0
 public SharkyBuild(BuildOptions buildOptions, MacroData macroData, ActiveUnitData activeUnitData, AttackData attackData, MicroTaskData microTaskData,
                    ChatService chatService, UnitCountService unitCountService)
 {
     BuildOptions     = buildOptions;
     MacroData        = macroData;
     ActiveUnitData   = activeUnitData;
     AttackData       = attackData;
     ChatService      = chatService;
     UnitCountService = unitCountService;
     MicroTaskData    = microTaskData;
 }
示例#17
0
        public BuildPylonService(MacroData macroData, IBuildingBuilder buildingBuilder, SharkyUnitData sharkyUnitData, ActiveUnitData activeUnitData, BaseData baseData, TargetingData targetingData, BuildingService buildingService)
        {
            MacroData       = macroData;
            BuildingBuilder = buildingBuilder;
            SharkyUnitData  = sharkyUnitData;
            ActiveUnitData  = activeUnitData;
            BaseData        = baseData;
            TargetingData   = targetingData;
            BuildingService = buildingService;

            defensivePointLastFailFrame = 0;
        }
示例#18
0
        public BuildDefenseService(MacroData macroData, IBuildingBuilder buildingBuilder, SharkyUnitData sharkyUnitData, ActiveUnitData activeUnitData, BaseData baseData, TargetingData targetingData, BuildOptions buildOptions)
        {
            MacroData       = macroData;
            BuildingBuilder = buildingBuilder;
            SharkyUnitData  = sharkyUnitData;
            ActiveUnitData  = activeUnitData;
            BaseData        = baseData;
            TargetingData   = targetingData;
            BuildOptions    = buildOptions;

            defensivePointLastFailFrame = 0;
        }
示例#19
0
        public AttackDataManager(AttackData attackData, ActiveUnitData activeUnitData, AttackTask attackTask, TargetPriorityService targetPriorityService, TargetingData targetingData, MacroData macroData, BaseData baseData, DebugService debugService)
        {
            AttackData            = attackData;
            ActiveUnitData        = activeUnitData;
            AttackTask            = attackTask;
            TargetPriorityService = targetPriorityService;
            TargetingData         = targetingData;
            MacroData             = macroData;
            BaseData = baseData;

            DebugService = debugService;
        }
示例#20
0
 public List <SC2APIProtocol.Action> MorphBuilding(MacroData macroData, TrainingTypeData unitData)
 {
     if ((unitData.Food == 0 || unitData.Food <= macroData.FoodLeft) && unitData.Minerals <= macroData.Minerals && unitData.Gas <= macroData.VespeneGas)
     {
         var building = ActiveUnitData.Commanders.Where(c => unitData.ProducingUnits.Contains((UnitTypes)c.Value.UnitCalculation.Unit.UnitType) && !c.Value.UnitCalculation.Unit.IsActive && c.Value.UnitCalculation.Unit.BuildProgress == 1);
         if (building.Count() > 0)
         {
             return(building.First().Value.Order(macroData.Frame, unitData.Ability));
         }
     }
     return(null);
 }
示例#21
0
        public WallOffTask(SharkyUnitData sharkyUnitData, TargetingData targetingData, ActiveUnitData activeUnitData, MacroData macroData, IBuildingPlacement wallOffPlacement, bool enabled, float priority)
        {
            SharkyUnitData   = sharkyUnitData;
            TargetingData    = targetingData;
            Priority         = priority;
            ActiveUnitData   = activeUnitData;
            MacroData        = macroData;
            WallOffPlacement = wallOffPlacement;

            UnitCommanders = new List <UnitCommander>();
            Enabled        = enabled;

            PlacementPoints = new List <Point2D>();
        }
示例#22
0
        public ProxyVoidRay(BuildOptions buildOptions, MacroData macroData, ActiveUnitData activeUnitData, AttackData attackData, ChatService chatService, ChronoData chronoData, SharkyOptions sharkyOptions, MicroTaskData microTaskData, ICounterTransitioner counterTransitioner, SharkyUnitData unitDataManager, ProxyLocationService proxyLocationService, DebugService debugService, UnitCountService unitCountService, IIndividualMicroController probeMicroController)
            : base(buildOptions, macroData, activeUnitData, attackData, chatService, chronoData, counterTransitioner, unitCountService)
        {
            SharkyOptions        = sharkyOptions;
            MicroTaskData        = microTaskData;
            SharkyUnitData       = unitDataManager;
            ProxyLocationService = proxyLocationService;

            OpeningAttackChatSent  = false;
            CancelledProxyChatSent = false;

            ProxyTask           = new ProxyTask(SharkyUnitData, false, 0.9f, MacroData, string.Empty, MicroTaskData, debugService, probeMicroController);
            ProxyTask.ProxyName = GetType().Name;
        }
示例#23
0
        public ProxyTask(SharkyUnitData sharkyUnitData, bool enabled, float priority, MacroData macroData, string proxyName, MicroTaskData microTaskData, DebugService debugService, IIndividualMicroController individualMicroController, int desiredWorkers = 1)
        {
            SharkyUnitData            = sharkyUnitData;
            Priority                  = priority;
            MacroData                 = macroData;
            ProxyName                 = proxyName;
            MicroTaskData             = microTaskData;
            DebugService              = debugService;
            IndividualMicroController = individualMicroController;

            UnitCommanders = new List <UnitCommander>();
            Enabled        = enabled;
            DesiredWorkers = desiredWorkers;
        }
示例#24
0
        public MiningTask(SharkyUnitData sharkyUnitData, BaseData baseData, ActiveUnitData activeUnitData, float priority, MiningDefenseService miningDefenseService, MacroData macroData, BuildOptions buildOptions)
        {
            SharkyUnitData       = sharkyUnitData;
            BaseData             = baseData;
            ActiveUnitData       = activeUnitData;
            Priority             = priority;
            MiningDefenseService = miningDefenseService;
            MacroData            = macroData;
            BuildOptions         = buildOptions;

            LowMineralsHighGas = false;

            UnitCommanders = new List <UnitCommander>();
            Enabled        = true;
        }
示例#25
0
        public List <Action> BuildGas(MacroData macroData, BuildingTypeData unitData, Unit geyser)
        {
            if (unitData.Minerals <= macroData.Minerals && unitData.Gas <= macroData.VespeneGas)
            {
                var worker = GetWorker(new Point2D {
                    X = geyser.Pos.X, Y = geyser.Pos.Y
                });
                if (worker != null)
                {
                    worker.UnitRole = UnitRole.Build;
                    return(worker.Order(macroData.Frame, unitData.Ability, null, geyser.Tag));
                }
            }

            return(null);
        }
示例#26
0
        private void SaveMacro(object sender, EventArgs e)
        {
            /*
             * FileSelector fileSelector = new FileSelector(FileSelectorFilters.Macros);
             * fileSelector.FileName = textBox_MacroName.Text;
             * if (fileSelector.ExecuteSaveDialog())
             * {
             *  MacroData macroData = new MacroData(textBox_MacroName.Text);
             *  macroData.Circuit = m_CircuitData;
             *  macroData.Symbol = m_SymbolData;
             *  macroData.Matching = m_Matchings.ToArray();
             *  MacroSerializer.SerializeMacro(fileSelector.FileName, macroData);
             * }
             * /**/
            string macroName = textBox_MacroName.Text;

            char[] invalid = Path.GetInvalidFileNameChars();
            foreach (char inv in invalid)
            {
                int index = macroName.IndexOf(inv);
                while (index > -1)
                {
                    macroName.Remove(index, 1);
                }
            }
            macroName.Replace(" ", "_");
            string filename = Application.StartupPath + @"\Macros\" + macroName + @".xmac";

            if (File.Exists(filename) &&
                MessageBox.Show("Es existiert bereits ein Makro mit dem gewählten Namen. Soll dieses überschrieben werden?",
                                "Warnung", MessageBoxButtons.YesNo, MessageBoxIcon.Warning,
                                MessageBoxDefaultButton.Button2) == DialogResult.No)
            {
                return;
            }

            MacroData macroData = new MacroData(textBox_MacroName.Text);

            macroData.Circuit  = m_CircuitData;
            macroData.Symbol   = m_SymbolData;
            macroData.Matching = m_Matchings.ToArray();
            MacroSerializer.SerializeMacro(filename, macroData);
            MacroCache.Instance.LoadMacro(filename);

            Close();
        }
示例#27
0
        } // saveUserMacroDataAs

        /// <summary>
        /// Saves the user macro data to an xml file with the file spec MacroDataFileSpec.
        /// </summary>
        private void saveUserMacroData()
        {
            // Extract the user supplied macro data.
            List <MacroData> macroDataList = new List <MacroData>();

            foreach (MacroDefinition macroDefinition in Template.MacroDefinitions)
            {
                if (macroDefinition.Type == MacroType.UserString)
                {
                    MacroData macroData = new MacroData(macroDefinition.Name, macroDefinition.Value);
                    macroDataList.Add(macroData);
                }
            }

            // Write the user macros data.
            MacroData.WriteToXml(MacroDataFileSpec, ref macroDataList);
        } // saveUserMacroData
示例#28
0
        public List <Action> BuildBuilding(MacroData macroData, UnitTypes unitType, BuildingTypeData unitData, Point2D generalLocation = null, bool ignoreMineralProximity = false, float maxDistance = 50, List <UnitCommander> workerPool = null, bool requireSameHeight = false, WallOffType wallOffType = WallOffType.None)
        {
            if (unitData.Minerals <= macroData.Minerals && unitData.Gas <= macroData.VespeneGas)
            {
                bool anyBase  = false;
                var  location = generalLocation;
                if (location == null)
                {
                    anyBase  = true;
                    location = GetReferenceLocation(TargetingData.SelfMainBasePoint);
                }
                var placementLocation = BuildingPlacement.FindPlacement(location, unitType, unitData.Size, ignoreMineralProximity, maxDistance, requireSameHeight, wallOffType);

                if (placementLocation == null)
                {
                    placementLocation = BuildingPlacement.FindPlacement(location, unitType, unitData.Size, true, maxDistance, requireSameHeight, wallOffType);
                }
                if (placementLocation == null && anyBase)
                {
                    foreach (var selfBase in BaseData.SelfBases)
                    {
                        placementLocation = BuildingPlacement.FindPlacement(selfBase.Location, unitType, unitData.Size, true, maxDistance, requireSameHeight, wallOffType);
                        if (placementLocation != null)
                        {
                            break;
                        }
                    }
                }
                if (placementLocation != null)
                {
                    var worker = GetWorker(placementLocation, workerPool);
                    if (worker != null)
                    {
                        if (workerPool == null)
                        {
                            worker.UnitRole = UnitRole.Build;
                        }

                        return(worker.Order(macroData.Frame, unitData.Ability, placementLocation));
                    }
                }
            }

            return(null);
        }
示例#29
0
        public TargetingManager(SharkyUnitData sharkyUnitData, BaseData baseData, MacroData macroData, TargetingData targetingData, MapData mapData,
                                ChokePointService chokePointService, ChokePointsService chokePointsService, DebugService debugService)
        {
            SharkyUnitData = sharkyUnitData;
            BaseData       = baseData;
            MacroData      = macroData;
            TargetingData  = targetingData;
            MapData        = mapData;

            ChokePointService  = chokePointService;
            ChokePointsService = chokePointsService;
            DebugService       = debugService;

            baseCount                         = 0;
            LastUpdateFrame                   = -10000;
            TargetingData.ChokePoints         = new ChokePoints();
            TargetingData.WallOffBasePosition = WallOffBasePosition.Current;
        }
示例#30
0
        public AttackTask(IMicroController microController, TargetingData targetingData, ActiveUnitData activeUnitData, DefenseService defenseService, MacroData macroData, AttackData attackData, TargetingService targetingService, MicroTaskData microTaskData, ArmySplitter armySplitter, EnemyCleanupService enemyCleanupService, float priority)
        {
            MicroController     = microController;
            TargetingData       = targetingData;
            ActiveUnitData      = activeUnitData;
            DefenseService      = defenseService;
            MacroData           = macroData;
            AttackData          = attackData;
            TargetingService    = targetingService;
            MicroTaskData       = microTaskData;
            ArmySplitter        = armySplitter;
            EnemyCleanupService = enemyCleanupService;
            Priority            = priority;

            UnitCommanders = new List <UnitCommander>();

            lastFrameTime = 0;
            Enabled       = true;
        }