예제 #1
0
 public override bool Execute(Beholder bot)
 {
     Controller.Move(new List <Unit>()
     {
         bot.GetAvailableWorker()
     }, Postition);
     return(true);
 }
 public override bool Execute(Beholder bot)
 {
     if (Controller.CanConstruct(BuildingToConstruct))
     {
         Controller.Construct(bot.GetAvailableWorker(), BuildingToConstruct, ConstructionSpot);
         return(true);
     }
     return(false);
 }
        public override bool Execute(Beholder bot)
        {
            if (BuildingToConstruct == null)
            {
                switch (bot.GetRace())
                {
                case SC2APIProtocol.Race.Zerg: BuildingToConstruct = Units.EXTRACTOR; break;

                case SC2APIProtocol.Race.Protoss: BuildingToConstruct = Units.REFINERY; break;

                case SC2APIProtocol.Race.Terran: BuildingToConstruct = Units.ASSIMILATOR; break;

                default: throw new NotImplementedException();
                }
            }
            if (Controller.CanConstruct(BuildingToConstruct.Value))
            {
                Controller.ConstructGas(bot.GetAvailableWorker(), BuildingToConstruct.Value, Geyser);
                return(true);
            }
            return(false);
        }