Exemplo n.º 1
0
        public static void Generate(Faction faction)
        {
            Map facet = Faction.Facet;

            List <Town> towns = Town.Towns;

            StrongholdDefinition stronghold = faction.Definition.Stronghold;

            if (!CheckExistance(stronghold.JoinStone, facet, typeof(JoinStone)))
            {
                JoinStone join = new JoinStone(faction);
                WeakEntityCollection.Add("factions", join);
                join.MoveToWorld(stronghold.JoinStone, facet);
            }

            if (!CheckExistance(stronghold.FactionStone, facet, typeof(FactionStone)))
            {
                FactionStone stone = new FactionStone(faction);
                WeakEntityCollection.Add("factions", stone);
                stone.MoveToWorld(stronghold.FactionStone, facet);
            }

            for (int i = 0; i < stronghold.Monoliths.Length; ++i)
            {
                Point3D monolith = stronghold.Monoliths[i];

                if (!CheckExistance(monolith, facet, typeof(StrongholdMonolith)))
                {
                    StrongholdMonolith mono = new StrongholdMonolith(towns[i], faction);
                    WeakEntityCollection.Add("factions", mono);
                    mono.MoveToWorld(monolith, facet);
                }
            }
        }
Exemplo n.º 2
0
        public static void Generate(Faction faction)
        {
            Map facet = Faction.Facet;

            List<Town> towns = Town.Towns;

            StrongholdDefinition stronghold = faction.Definition.Stronghold;

			if (!CheckExistance(stronghold.JoinStone, facet, typeof(JoinStone)))
			{
				JoinStone join = new JoinStone(faction);
				WeakEntityCollection.Add("factions", join);
				join.MoveToWorld(stronghold.JoinStone, facet);
			}

			if (!CheckExistance(stronghold.FactionStone, facet, typeof(FactionStone)))
			{
				FactionStone stone = new FactionStone(faction);
				WeakEntityCollection.Add("factions", stone);
				stone.MoveToWorld(stronghold.FactionStone, facet);
			}

            for (int i = 0; i < stronghold.Monoliths.Length; ++i)
            {
                Point3D monolith = stronghold.Monoliths[i];

				if (!CheckExistance(monolith, facet, typeof(StrongholdMonolith)))
				{
					StrongholdMonolith mono = new StrongholdMonolith(towns[i], faction);
					WeakEntityCollection.Add("factions", mono);
					mono.MoveToWorld(monolith, facet);
				}
            }
        }