Esempio n. 1
0
 public static Item CreateRandomItem(int level, ItemType itemType)
 {
     if (itemType == ItemType.Cannon)
     {
         return(Cannon.CreateRandomCannon(level));
     }
     else if (itemType == ItemType.EMPGenerator)
     {
         return(EMPGenerator.CreateRandomEMPGenerator(level));
     }
     else if (itemType == ItemType.Engine)
     {
         return(Engine.CreateRandomEngine(level));
     }
     else if (itemType == ItemType.Flamethrower)
     {
         return(Flamethrower.CreateRandomFlamethrower(level));
     }
     else if (itemType == ItemType.Hangar)
     {
         return(Hangar.CreateRandomHangar(level));
     }
     else if (itemType == ItemType.Harpoon)
     {
         return(Harpoon.CreateRandomHarpoon(level));
     }
     else if (itemType == ItemType.Hull)
     {
         return(Hull.CreateRandomHull(level));
     }
     else if (itemType == ItemType.Laser)
     {
         return(Laser.CreateRandomLaser(level));
     }
     else if (itemType == ItemType.LifeSupport)
     {
         return(LifeSupport.CreateRandomLifeSupport(level));
     }
     else if (itemType == ItemType.MineLayer)
     {
         return(MineLayer.CreateRandomMineLayer(level));
     }
     else if (itemType == ItemType.Reactor)
     {
         return(Reactor.CreateRandomReactor(level));
     }
     else if (itemType == ItemType.RocketLauncher)
     {
         return(RocketLauncher.CreateRandomRocketLauncher(level));
     }
     else if (itemType == ItemType.ShieldGenerator)
     {
         return(ShieldGenerator.CreateRandomShieldGenerator(level));
     }
     else
     {
         return(null);
     }
 }