public static string GetOrderParameter(this IBuildingInfo buildingInfo, string selectedLanguageCode)
        {
            var labelLocalization = buildingInfo.Localization == null ? buildingInfo.Identifier : buildingInfo.Localization[selectedLanguageCode];

            if (string.IsNullOrEmpty(labelLocalization))
            {
                labelLocalization = buildingInfo.Localization["eng"];
            }

            return(labelLocalization);
        }
        public static string GetOrderParameter(this IBuildingInfo buildingInfo)
        {
            var labelLocalization = buildingInfo.Localization == null ? buildingInfo.Identifier : buildingInfo.Localization[AnnoDesigner.Localization.Localization.GetLanguageCodeFromName(MainWindow.SelectedLanguage)];

            if (string.IsNullOrEmpty(labelLocalization))
            {
                labelLocalization = buildingInfo.Localization["eng"];
            }
            //return buildingInfo.Localization == null ? buildingInfo.Identifier : buildingInfo.Localization[AnnoDesigner.Localization.Localization.GetLanguageCodeFromName(MainWindow.SelectedLanguage)];
            return(labelLocalization);
        }
Esempio n. 3
0
    public void SendArmyToCamp(ArmyType armyType, int level, IBuildingInfo campInfo, IBuildingInfo factoryInfo)
    {
        GameObject   army         = this.GenerateArmy(armyType, level);
        TilePosition initialPoint = BorderPointHelper.FindValidInflateOneBorderPoint(factoryInfo);

        army.transform.position = PositionConvertor.GetWorldPositionFromActorTileIndex(initialPoint);

        ArmyAI ai = army.GetComponent <ArmyAI>();

        ai.SendArmyToCamp(campInfo);
    }
        private bool ParseBuildingBlockerForAnno1800(XmlDocument ifoDocument, IBuildingInfo building)
        {
            try
            {
                XmlNode node = ifoDocument.FirstChild[BUILDBLOCKER].FirstChild;
                building.BuildBlocker = new SerializableDictionary <int>();

                string xfNormal = node["xf"].InnerText;
                string zfNormal = node["zf"].InnerText;
                var    xf       = ParseBuildingBlockerNumber(xfNormal);
                var    zf       = ParseBuildingBlockerNumber(zfNormal);

                //In case buildings have wrong size change it here.
                //Check by identifier. *Caps Sensetive*
                if (building.Identifier == "Palace_Module_05 (gate)")
                {
                    xf = 3; zf = 3;
                }

                //if both values are zero, then skip building
                if (xf < 1 && zf < 1)
                {
                    Console.WriteLine("-'X' and 'Z' are both 0 - Building will be skipped!");
                    return(false);
                }

                if (xf > 0)
                {
                    building.BuildBlocker[X] = xf;
                }
                else
                {
                    building.BuildBlocker[X] = 1;
                }

                if (zf > 0)
                {
                    building.BuildBlocker[Z] = zf;
                }
                else
                {
                    building.BuildBlocker[Z] = 1;
                }
            }
            catch (NullReferenceException)
            {
                Console.WriteLine("-BuildBlocker not found, skipping");
                return(false);
            }

            return(true);
        }
        public bool GetBuildingBlocker(string basePath, IBuildingInfo building, string variationFilename, string annoVersion)
        {
            var ifoDocument = _ifoFileProvider.GetIfoFileContent(basePath, variationFilename);

            if (annoVersion.Equals(Constants.ANNO_VERSION_1800, StringComparison.OrdinalIgnoreCase))
            {
                return(ParseBuildingBlockerForAnno1800(ifoDocument, building));
            }
            else
            {
                return(ParseBuildingBlocker(ifoDocument, building, variationFilename));
            }
        }
        public bool GetDistanceRange(bool isPavedStreet, IBuildingInfo buildingInfo)
        {
            if (buildingInfo == null || buildingInfo.InfluenceRange <= 0)
            {
                BuildingInfluenceRange = 0;
                return(false);
            }

            if (isPavedStreet)
            {
                if (buildingInfo.InfluenceRange <= 1)
                {
                    BuildingInfluenceRange = 0;
                    return(false);
                }

                //sum for range on paved street for City Institution Building = n*1.38 (Police, Fire stations and Hospials)
                //to round up, there must be added 0.5 to the numbers after the multiplier
                //WYSWYG : the minus 2 is what gamers see as they count the Dark Green area on Paved Street
                if (string.Equals(buildingInfo.Template, "CityInstitutionBuilding", StringComparison.OrdinalIgnoreCase))
                {
                    BuildingInfluenceRange = Math.Round(((buildingInfo.InfluenceRange * 1.38) + 0.5) - 2);
                }
                //sum for range on paved street for Public Service Building = n*1.43 (Marketplaces, Pubs, Banks, ... (etc))
                //to round up, there must be added 0.5 to the numbers after the multiplier
                //WYSWYG : the minus 2 is what gamers see as they count the Dark Green area on Paved Street
                else
                {
                    BuildingInfluenceRange = Math.Round(((buildingInfo.InfluenceRange * 1.43) + 0.5) - 2);
                }

                return(true);
            }
            else
            {
                if (buildingInfo.InfluenceRange <= 2)
                {
                    BuildingInfluenceRange = 0;
                    return(false);
                }

                //WYSWYG : the minus 2 is what gamers see as they count the Dark Green area on Dirt Road
                BuildingInfluenceRange = buildingInfo.InfluenceRange - 2;
                return(true);
            }
        }
        private bool ParseBuildingBlockerForAnno1800(XmlDocument ifoDocument, IBuildingInfo building)
        {
            try
            {
                XmlNode node = ifoDocument.FirstChild[BUILDBLOCKER].FirstChild;
                building.BuildBlocker = new SerializableDictionary <int>();

                string xfNormal = node["xf"].InnerText;
                string zfNormal = node["zf"].InnerText;
                var    xf       = ParseBuildingBlockerNumber(xfNormal);
                var    zf       = ParseBuildingBlockerNumber(zfNormal);

                //if both values are zero, then skip building
                if (xf < 1 && zf < 0)
                {
                    Console.WriteLine("-'X' and 'Z' are both 0 - Building will skipped!");
                    return(false);
                }

                if (xf > 0)
                {
                    building.BuildBlocker[X] = xf;
                }
                else
                {
                    building.BuildBlocker[X] = 1;
                }

                if (zf > 0)
                {
                    building.BuildBlocker[Z] = zf;
                }
                else
                {
                    building.BuildBlocker[Z] = 1;
                }
            }
            catch (NullReferenceException)
            {
                Console.WriteLine("-BuildBlocker not found, skipping");
                return(false);
            }

            return(true);
        }
Esempio n. 8
0
    public void RunAway(HashSet <BuildingType> disappearBuildings)
    {
        if (this.m_CurrentState is VillagerDisappearState)
        {
            GameObject.Destroy(this.gameObject);
        }
        else
        {
            List <IBuildingInfo> buildings = this.SceneHelper.GetBuildingsOfTypes(disappearBuildings);
            int index = Random.Range(0, buildings.Count);

            IBuildingInfo disappearBuilding = buildings[index];
            TilePosition  targetPosition    = BorderPointHelper.FindValidInflateOneBorderPoint(disappearBuilding);

            ActorRunAwayState runAwayState = new ActorRunAwayState(this.MapData, targetPosition, this);
            this.ChangeState(runAwayState);
        }
    }
        public static AnnoObject ToAnnoObject(this IBuildingInfo buildingInfo)
        {
            var labelLocalization = buildingInfo.Localization == null ? buildingInfo.Identifier : buildingInfo.Localization[AnnoDesigner.Localization.Localization.GetLanguageCodeFromName(MainWindow.SelectedLanguage)];

            if (string.IsNullOrEmpty(labelLocalization))
            {
                labelLocalization = buildingInfo.Localization["eng"];
            }
            return(new AnnoObject
            {
                //Label = (buildingInfo.Localization == null ? buildingInfo.Identifier : buildingInfo.Localization[AnnoDesigner.Localization.Localization.GetLanguageCodeFromName(MainWindow.SelectedLanguage)]),
                Label = labelLocalization,
                Icon = buildingInfo.IconFileName,
                Radius = buildingInfo.InfluenceRadius,
                InfluenceRange = buildingInfo.InfluenceRange - 2,
                Identifier = buildingInfo.Identifier,
                Size = buildingInfo.BuildBlocker == null ? new Size() : new Size(buildingInfo.BuildBlocker["x"], buildingInfo.BuildBlocker["z"]),
                Template = buildingInfo.Template
                           //BuildCosts = BuildCost
            });
        }
Esempio n. 10
0
    private void TurnInteractable()
    {
        var typeClass = Type.GetType("BuildingInfo" + GetNameWithoutWhitespace());

        if (typeClass == null)
        {
            throw new Exception("COULD NOT FIND CLASS");
        }

        _buildingInfo = Activator.CreateInstance(typeClass, false) as IBuildingInfo;

        if (!_buildingInfo.CanAffordBuilding())
        {
            _buildingInfo = null;
            return;
        }
        else
        {
            _buildingInfo.BuyBuilding();
            GameController.Instance.playerController.InvokeUIUpdate();
        }

        interact              = true;
        gameObject.layer      = 0;
        renderer.sortingOrder = 0;
        gameObject.tag        = "Building";
        ChangeColor(1f, 1f, 1f, 1f);

        var   boxCollider   = gameObject.AddComponent <BoxCollider2D>();
        float playersHeight = 0.45f; //FIXME hent ut skikkelig verdi. Dette er slik at spilleren kan "gå helt opp til bygningen"

        boxCollider.size   = new Vector2(1f, 1f - playersHeight);
        boxCollider.offset = new Vector2(0, playersHeight / 2.3f);

        gameObject.GetComponent <AudioSource>().Play();
        gameObject.SetActive(gameObject.transform.GetChild(0));
        UpdateText();
    }
        public static AnnoObject ToAnnoObject(this IBuildingInfo buildingInfo, string selectedLanguageCode)
        {
            var labelLocalization = buildingInfo.Localization == null ? buildingInfo.Identifier : buildingInfo.Localization[selectedLanguageCode];

            if (string.IsNullOrEmpty(labelLocalization))
            {
                labelLocalization = buildingInfo.Localization["eng"];
            }

            return(new AnnoObject
            {
                Label = labelLocalization,
                Icon = buildingInfo.IconFileName,
                Radius = buildingInfo.InfluenceRadius,
                InfluenceRange = buildingInfo.InfluenceRange - 2,
                Identifier = buildingInfo.Identifier,
                Size = buildingInfo.BuildBlocker == null ? new Size() : new Size(buildingInfo.BuildBlocker["x"], buildingInfo.BuildBlocker["z"]),
                Template = buildingInfo.Template,
                Road = buildingInfo.Road,
                Borderless = buildingInfo.Borderless
                             //BuildCosts = BuildCost
            });
        }
Esempio n. 12
0
    public TilePosition FindCampStandablePoint(IBuildingInfo campInfo)
    {
        int          index = Random.Range(0, campInfo.BuildingObstacleList.Count);
        TilePosition buildingObstaclePosition = campInfo.BuildingObstacleList[index];

        TilePosition buildingPosition = campInfo.BuildingPosition + buildingObstaclePosition;

        TilePosition actorObstaclePosition = PositionConvertor.GetActorTilePositionFromBuildingTilePosition(buildingPosition);
        TilePosition actorOffset           = actorObstaclePosition - campInfo.ActorPosition;

        while (!actorObstaclePosition.IsValidActorTilePosition() ||
               campInfo.ActorObstacleList.Contains(actorOffset))
        {
            index = Random.Range(0, campInfo.BuildingObstacleList.Count);
            buildingObstaclePosition = campInfo.BuildingObstacleList[index];

            buildingPosition = campInfo.BuildingPosition + buildingObstaclePosition;

            actorObstaclePosition = PositionConvertor.GetActorTilePositionFromBuildingTilePosition(buildingPosition);
            actorOffset           = actorObstaclePosition - campInfo.ActorPosition;
        }
        return(actorObstaclePosition);
    }
        private bool ParseBuildingBlockerForAnno1800(XmlDocument ifoDocument, IBuildingInfo building)
        {
            try
            {
                var    xf = 0;
                var    zf = 0;
                string xc, zc = ""; // just information for checking line calculated mode

                // Change since 25-05-2021 - Fixing measurements of Buildings Buildblockers.
                // Insttead of taking one XF * 2 and ZF * 2, it will check now the differences between 2 given XF's and ZF's
                // Get all 4 [Position] childs from xml .ifo document
                XmlNode node1 = ifoDocument.FirstChild?[BUILDBLOCKER].FirstChild;
                XmlNode node2 = ifoDocument.FirstChild?[BUILDBLOCKER].FirstChild.NextSibling;
                XmlNode node3 = ifoDocument.FirstChild?[BUILDBLOCKER].FirstChild.NextSibling.NextSibling;
                XmlNode node4 = ifoDocument.FirstChild?[BUILDBLOCKER].FirstChild.NextSibling.NextSibling.NextSibling;

                //check of the nodes contains data
                if (string.IsNullOrEmpty(node1?.InnerText) || string.IsNullOrEmpty(node2?.InnerText) || string.IsNullOrEmpty(node3?.InnerText) || string.IsNullOrEmpty(node4?.InnerText))
                {
                    Console.WriteLine("-'X' and 'Z' are both 'Null' - Building will be skipped!");
                    return(false);
                }

                building.BuildBlocker = new SerializableDictionary <int>();

                //Convert the strings to a Variable and replace the "." for a "," to keep calculatable numbers
                var xfNormal1 = Convert.ToDouble(node1["xf"].InnerText.Replace(".", ","));
                var zfNormal1 = Convert.ToDouble(node1["zf"].InnerText.Replace(".", ","));
                var xfNormal2 = Convert.ToDouble(node2["xf"].InnerText.Replace(".", ","));
                var zfNormal2 = Convert.ToDouble(node2["zf"].InnerText.Replace(".", ","));
                var xfNormal3 = Convert.ToDouble(node3["xf"].InnerText.Replace(".", ","));
                var zfNormal3 = Convert.ToDouble(node3["zf"].InnerText.Replace(".", ","));
                var xfNormal4 = Convert.ToDouble(node4["xf"].InnerText.Replace(".", ","));
                var zfNormal4 = Convert.ToDouble(node4["zf"].InnerText.Replace(".", ","));

                // Calculation mode check highest number minus lowest number
                // example 1:  9 - -2 = 11
                // example 2: 2,5 - -2,5 = 5
                // This will give the right BuildBlocker[X] and BuildBlocker[Y] for all buildings from anno 1800

                // XF Calculation
                if (xfNormal1 > xfNormal3)
                {
                    xf = Convert.ToInt32(xfNormal1 - xfNormal3);
                    xc = "MA";// just information for checking line calculated mode
                }
                else
                {
                    xf = Convert.ToInt32(xfNormal3 - xfNormal1);
                    xc = "MB";// just information for checking line calculated mode
                }

                // zf Calculation
                if (zfNormal1 > zfNormal2)
                {
                    zf = Convert.ToInt32(zfNormal1 - zfNormal2);
                    zc = "MA";// just information for checking line calculated mode
                }
                else if (zfNormal1 == zfNormal2)
                {
                    if (zfNormal1 > zfNormal3)
                    {
                        zf = Convert.ToInt32(zfNormal1 - zfNormal3);
                        zc = "MB";// just information for checking line calculated mode
                    }
                    else
                    {
                        zf = Convert.ToInt32(zfNormal3 - zfNormal1);
                        zc = "MD";// just information for checking line calculated mode
                    }
                }
                else
                {
                    zf = Convert.ToInt32(zfNormal2 - zfNormal1);
                    zc = "MC";// just information for checking line calculated mode
                }


                if ((xf == 0 || zf == 0) && building.Identifier != "Trail_05x05")
                {
                    //when something goes wrong on the measurements, report and stop till a key is hit
                    Console.WriteLine("MEASUREMENTS GOING WRONG!!! CHECK THIS BUILDING");
                    Console.WriteLine(" Node 1 - XF: {0} | ZF: {1} ;\n Node 2 - XF: {2} | ZF: {3} ;\n Node 3 - XF: {4} | ZF: {5} ;\n Node 4 - XF: {6} | ZF: {7}", xfNormal1, zfNormal1, xfNormal2, zfNormal2, xfNormal3, zfNormal3, xfNormal4, zfNormal4);
                    Console.WriteLine("Building measurement is : {0} x {1} (Method {2} and {3})", xf, zf, xc, zc);
                    Console.WriteLine("Press a key to continue");
                    //Console.ReadKey();
                }

                //if both values are zero, then skip building
                if (xf < 1 && zf < 1)
                {
                    Console.WriteLine("-'X' and 'Z' are both 0 - Building will be skipped!");
                    return(false);
                }

                if (xf > 0)
                {
                    building.BuildBlocker[X] = Math.Abs(xf);
                }
                else
                {
                    building.BuildBlocker[X] = 1;
                }

                if (zf > 0)
                {
                    building.BuildBlocker[Z] = Math.Abs(zf);
                }
                else
                {
                    building.BuildBlocker[Z] = 1;
                }
            }
            catch (NullReferenceException)
            {
                Console.WriteLine("-BuildBlocker not found, skipping");
                return(false);
            }

            return(true);
        }
        private bool ParseBuildingBlocker(XmlDocument ifoDocument, IBuildingInfo building, string variationFilename)
        {
            var variationFilenameWithoutExtension = Path.GetFileNameWithoutExtension(variationFilename);

            try
            {
                XmlNode node = ifoDocument.FirstChild[BUILDBLOCKER]?.FirstChild;
                if (node is null)
                {
                    return(false);
                }

                building.BuildBlocker = new SerializableDictionary <int>();

                var x = Math.Abs(Convert.ToInt32(node[X].InnerText) / 2048);
                var z = Math.Abs(Convert.ToInt32(node[Z].InnerText) / 2048);

                //if both values are zero, then skip building
                if (x < 1 && z < 1)
                {
                    Console.WriteLine("-'X' and 'Z' are both 0 - Building will skipped!");
                    return(false);
                }
                //correcting measurement of anno 2205 building: Cybernetics Factory (file say 6x7, in game it is 6x8) (10-01-2021)
                if (variationFilenameWithoutExtension == "production_biotech_moon_facility_02")
                {
                    x = 6;
                    z = 8;
                }
                if (x > 0)
                {
                    //Console.WriteLine("{0}", Path.GetFileNameWithoutExtension(variationFilename));
                    if (variationFilenameWithoutExtension != ORNAMENTAL_POST_09)
                    {
                        if (variationFilenameWithoutExtension != WATER_MILL_ECOS)
                        {
                            building.BuildBlocker[X] = x;
                        }
                        else
                        {
                            building.BuildBlocker[X] = 3;
                        }
                    }
                    else
                    {
                        building.BuildBlocker[X] = 7;
                    }
                }
                else
                {
                    building.BuildBlocker[X] = 1;
                }

                if (z > 0)
                {
                    if (variationFilenameWithoutExtension != WATER_MILL_ECOS && variationFilenameWithoutExtension != ORNAMENTAL_POST_09)
                    {
                        building.BuildBlocker[Z] = z;
                    }
                    else
                    {
                        building.BuildBlocker[Z] = 7;
                    }
                }
                else
                {
                    building.BuildBlocker[Z] = 1;
                }
            }
            catch (NullReferenceException)
            {
                Console.WriteLine("-BuildBlocker not found, skipping");
                return(false);
            }

            return(true);
        }
Esempio n. 15
0
 public ArmyWalkState(IMapData mapData, TilePosition targetPosition, NewAI aiBehavior, IBuildingInfo targetInfo) :
     base(mapData, targetPosition, aiBehavior, targetInfo)
 {
     this.WalkVelocity = ((ArmyAI)aiBehavior).WalkVelocity;
 }
Esempio n. 16
0
    public void SendMercenaryToCamp(MercenaryType mercenaryType, IBuildingInfo campInfo, IBuildingInfo factoryInfo)
    {
        GameObject   mercenary    = this.GenerateMercenary(mercenaryType);
        TilePosition initialPoint = BorderPointHelper.FindValidInflateOneBorderPoint(factoryInfo);

        mercenary.transform.position = PositionConvertor.GetWorldPositionFromActorTileIndex(initialPoint);

        ArmyAI ai = mercenary.GetComponent <ArmyAI>();

        ai.SendArmyToCamp(campInfo);
    }
Esempio n. 17
0
 public VillagerIdleState(NewAI aiBehavior, IBuildingInfo targetInfo, bool isTargetHover) : base(aiBehavior)
 {
     this.m_TargetInfo    = targetInfo;
     this.m_ActorConfig   = ActorPrefabConfig.Instance.GetComponent <ActorConfig>();
     this.m_IsTargetHover = isTargetHover;
 }
Esempio n. 18
0
    public BuilderReturnState(IMapData mapData, TilePosition targetPosition, NewAI aiBehavior, IBuildingInfo targetInfo)
        : base(mapData, targetPosition, aiBehavior, targetInfo)
    {
        ActorConfig config = ActorPrefabConfig.Instance.GetComponent <ActorConfig>();

        this.WalkVelocity = config.BuilderMoveVelocity;
    }
        private bool ParseBuildingBlockerForAnno1800(XmlDocument ifoDocument, IBuildingInfo building)
        {
            try
            {
                XmlNode node = ifoDocument.FirstChild?[BUILDBLOCKER].FirstChild;

                //check of the node contains data
                if (string.IsNullOrEmpty(node?.InnerText))
                {
                    Console.WriteLine("-'X' and 'Z' are both 'Null' - Building will be skipped!");
                    return(false);
                }

                building.BuildBlocker = new SerializableDictionary <int>();

                string xfNormal = node["xf"].InnerText;
                string zfNormal = node["zf"].InnerText;
                var    xf       = ParseBuildingBlockerNumber(xfNormal);
                var    zf       = ParseBuildingBlockerNumber(zfNormal);

                //Adjust size of buildings.
                //Some buildings have wrong values in the game data.
                //So those values are adjusted to the real values from inside the game.
                //The check is performed by the identifier of a building (CASE SENSITIVE).
                switch (building.Identifier)
                {
                case "Palace_Module_05 (gate)": xf = 3; zf = 3; break;

                case "Harbor_arctic_01 (Depot)": xf = 11; zf = 4; break;

                case "River_colony02_01 (Clay Harvester)":
                case "River_colony02_02 (Paper Mill)":
                case "River_colony02_03 (Water Pump)": xf = 9; zf = 5; break;
                }
                //if both values are zero, then skip building
                if (xf < 1 && zf < 1)
                {
                    Console.WriteLine("-'X' and 'Z' are both 0 - Building will be skipped!");
                    return(false);
                }

                if (xf > 0)
                {
                    building.BuildBlocker[X] = xf;
                }
                else
                {
                    building.BuildBlocker[X] = 1;
                }

                if (zf > 0)
                {
                    building.BuildBlocker[Z] = zf;
                }
                else
                {
                    building.BuildBlocker[Z] = 1;
                }
            }
            catch (NullReferenceException)
            {
                Console.WriteLine("-BuildBlocker not found, skipping");
                return(false);
            }

            return(true);
        }
        private bool ParseBuildingBlocker(XmlDocument ifoDocument, IBuildingInfo building, string variationFilename)
        {
            var variationFilenameWithoutExtension = Path.GetFileNameWithoutExtension(variationFilename);

            try
            {
                XmlNode node = ifoDocument.FirstChild[BUILDBLOCKER].FirstChild;
                building.BuildBlocker = new SerializableDictionary <int>();

                var x = Math.Abs(Convert.ToInt32(node[X].InnerText) / 2048);
                var z = Math.Abs(Convert.ToInt32(node[Z].InnerText) / 2048);

                //if both values are zero, then skip building
                if (x < 1 && z < 1)
                {
                    Console.WriteLine("-'X' and 'Z' are both 0 - Building will skipped!");
                    return(false);
                }

                if (x > 0)
                {
                    //Console.WriteLine("{0}", Path.GetFileNameWithoutExtension(variationFilename));
                    if (variationFilenameWithoutExtension != ORNAMENTAL_POST_09)
                    {
                        if (variationFilenameWithoutExtension != WATER_MILL_ECOS)
                        {
                            building.BuildBlocker[X] = x;
                        }
                        else
                        {
                            building.BuildBlocker[X] = 3;
                        }
                    }
                    else
                    {
                        building.BuildBlocker[X] = 7;
                    }
                }
                else
                {
                    building.BuildBlocker[X] = 1;
                }

                if (z > 0)
                {
                    if (variationFilenameWithoutExtension != WATER_MILL_ECOS && variationFilenameWithoutExtension != ORNAMENTAL_POST_09)
                    {
                        building.BuildBlocker[Z] = z;
                    }
                    else
                    {
                        building.BuildBlocker[Z] = 7;
                    }
                }
                else
                {
                    building.BuildBlocker[Z] = 1;
                }
            }
            catch (NullReferenceException)
            {
                Console.WriteLine("-BuildBlocker not found, skipping");
                return(false);
            }

            return(true);
        }
Esempio n. 21
0
 public VillagerWalkState(IMapData mapData, TilePosition targetPosition, NewAI aiBehavior, IBuildingInfo targetInfo) :
     base(mapData, targetPosition, aiBehavior, targetInfo)
 {
     this.m_ActorConfig = ActorPrefabConfig.Instance.GetComponent <ActorConfig>();
     this.WalkVelocity  = this.m_ActorConfig.VillagerMoveVelocity;
     this.m_Offset      = targetPosition - targetInfo.ActorPosition;
 }