示例#1
0
 public void OnNextTurn(City city, GameMaster game)
 {
     foreach (BuildingEffect effect in GlobalBuildingDictionary.GetNextTurnEffects(ID))
     {
         effect.Apply(city);
     }
 }
示例#2
0
        public string GetDescription()
        {
            string descr = "BUILDING TEST DESCRIPTION\n";

            descr += "On Completion: \n";
            foreach (BuildingEffect effect in GlobalBuildingDictionary.GetCompletionEffects(ID))
            {
                descr += "\t" + effect.ToString() + "\n";
            }
            descr += "On Next Turn:";
            foreach (BuildingEffect effect in GlobalBuildingDictionary.GetNextTurnEffects(ID))
            {
                descr += "\n\t" + effect.ToString();
            }
            return(descr);
        }
示例#3
0
        public void Complete(City city, World world)
        {
            foreach (BuildingEffect effect in GlobalBuildingDictionary.GetCompletionEffects(ID))
            {
                effect.Apply(city);
            }

            if (destIndex == -1)
            {
                destination.Buildings.Add(this);
            }
            else
            {
                destination.Buildings[destIndex] = this;
            }
        }