Exemple #1
0
 public static Entity CreateEnemyByEntityDefId(string enemyDefId, string activationGroupId, int currentTick)
 {
     if (enemyDefId == EntityDefId.SCOUT)
     {
         return(EntityBuilder.CreateScoutEntity(activationGroupId, currentTick));
     }
     else if (enemyDefId == EntityDefId.FIGHTER)
     {
         return(EntityBuilder.CreateFighterEntity(activationGroupId, currentTick));
     }
     else if (enemyDefId == EntityDefId.GUNSHIP)
     {
         return(EntityBuilder.CreateGunshipEntity(activationGroupId, currentTick));
     }
     else if (enemyDefId == EntityDefId.FRIGATE)
     {
         return(EntityBuilder.CreateFrigateEntity(activationGroupId, currentTick));
     }
     else if (enemyDefId == EntityDefId.DESTROYER)
     {
         return(EntityBuilder.CreateDestroyerEntity(activationGroupId, currentTick));
     }
     else if (enemyDefId == EntityDefId.CRUISER)
     {
         return(EntityBuilder.CreateCruiserEntity(activationGroupId, currentTick));
     }
     else if (enemyDefId == EntityDefId.CARRIER)
     {
         return(EntityBuilder.CreateCarrierEntity(activationGroupId, currentTick));
     }
     else if (enemyDefId == EntityDefId.DIPLOMAT)
     {
         return(EntityBuilder.CreateDiplomatEntity(activationGroupId, currentTick));
     }
     else
     {
         throw new NotImplementedException("No mapping defined for " + enemyDefId);
     }
 }
Exemple #2
0
 public static Entity CreateItemByEntityDefId(string itemDefId)
 {
     if (itemDefId == EntityDefId.ITEM_DUCT_TAPE)
     {
         return(EntityBuilder.CreateDuctTapeEntity());
     }
     else if (itemDefId == EntityDefId.ITEM_EXTRA_BATTERY)
     {
         return(EntityBuilder.CreateExtraBatteryEntity());
     }
     else if (itemDefId == EntityDefId.ITEM_RED_PAINT)
     {
         return(EntityBuilder.CreateRedPaintEntity());
     }
     else if (itemDefId == EntityDefId.ITEM_EMP)
     {
         return(EntityBuilder.CreateEMPEntity());
     }
     else
     {
         throw new NotImplementedException("No mapping defined for " + itemDefId);
     }
 }