Example #1
0
        public Player AddPlayer(CivilizationData CivilizationData, bool IsAI)
        {
            Player Player = PlayerManager.AddPlayer();
            Player.IsAI = IsAI;
            Player.CivilizationData = CivilizationData;

            MapTile MapTile = MapManager.Current.GetStartingLocation(Player);
            if (MapTile == null) {
                MapTile = MapManager.Current.GetRandomLandTile();
            }

            Player.AddUnit(ResourceInterface.UnitData[0], MapTile);
            Player.AddUnit(ResourceInterface.UnitData[1], MapTile);

            Player.CurrentEra = ResourceInterface.EraData[0];

            foreach (var Item in ResourceInterface.GovernmentData) {
                if (Item.Default == true) {
                    Player.GovernmentData = Item;
                }
            }

            foreach (var Item in CivilizationData.FreeAdvances) {
                //Player.SetDiscovered(Item);
            }

            return Player;
        }
Example #2
0
 public static CivilizationData AddCivilization()
 {
     CivilizationData data = new CivilizationData();
     data.Index = ResourceInterface.CivilizationData.Count;
     ResourceInterface.CivilizationData.Add(data);
     return data;
 }