Ejemplo n.º 1
0
 public Enhancement Create(EnhancementType enhancementType)
 {
     switch (enhancementType)
     {
         case EnhancementType.ThanixCannon:
             return new Enhancement("ThanixCannon", 0, 50, 0);
         case EnhancementType.KineticBarrier:
             return new Enhancement("KineticBarrier", 100, 0, 0);
         case EnhancementType.ExtendedFuelCells:
             return new Enhancement("ExtendedFuelCells", 0, 0, 200);
         default:
             throw new NotSupportedException("Enhancement type not supported.");
     }
 }
 public Enhancement Create(EnhancementType enhancementType)
 {
     switch (enhancementType)
     {
         case EnhancementType.ThanixCannon:
             return new ThanixCannon("ThanixCannon");
         case EnhancementType.KineticBarrier:
             return new KineticBarrier("KineticBarrier");
         case EnhancementType.ExtendedFuelCells:
             return new ExtendedFuelCells("ExtendedFuelCells");
         default:
             throw new ArgumentException("Not known enhancement.");
     }
 }