예제 #1
0
        public static Tower GetTower(string name)
        {
            Tower towerToCopy = DefaultTower;

            if (Towers.ContainsKey(name))
            {
                towerToCopy = Towers[name];
            }

            return(towerToCopy.Duplicate());
        }
예제 #2
0
 public static void Add(string name, Tower tower)
 {
     if (!Towers.ContainsKey(name))
     {
         Towers.Add(name, tower);
         if (DefaultTower == null)
         {
             DefaultTower = tower;
         }
     }
 }