Пример #1
0
        public static Bullet GetBullet(string name)
        {
            Bullet bulletToCopy = DefaultBullet;

            if (Bullets.ContainsKey(name))
            {
                bulletToCopy = Bullets[name];
            }

            return(bulletToCopy.Duplicate());
        }
Пример #2
0
 public static void Add(string name, Bullet bullet)
 {
     if (!Bullets.ContainsKey(name))
     {
         Bullets.Add(name, bullet);
         if (DefaultBullet == null)
         {
             DefaultBullet = bullet;
         }
     }
 }