コード例 #1
0
        private PlayerData CreatePlayerData(BuildingCell startingCell)
        {
            var playerData = new PlayerData(null);

            playerData.Init(config);

            playerData.TurnNumber = 1;
            playerData.TechnologyData.AddTechnology(startingCell.Technology);

            var startingCurrency = startingCell.GetCurrencyBonus();

            startingCurrency.supplies = config.startingSupply;
            playerData.CurrencyData.SetCurrency(startingCurrency);

            return(playerData);
        }
コード例 #2
0
 public override int CalculatePopulation(BuildingCell cell, PlayerData data)
 {
     return(cell.GetCurrencyBonus().production);
 }
コード例 #3
0
 public override int CalculateSupplies(BuildingCell cell, PlayerData data)
 {
     return(cell.GetCurrencyBonus().supplies);
 }