*/
public class GDXCreatureFactory extends AbstractCreatureFactory{
@Override
public GenericUnit produceUnit(int creatureID, int onX, int onY, TilelessMap onMap) {
GenericUnit newUnit;
newUnit = new GDXUnit(onX, onY, creatureID, onMap);
if (onMap != null) {
onMap.placeUnit(onX, onY, newUnit);
Log.info("PLACED UNIT");
} else {
Log.warn("No map!");
}
if (Detonator.INSTANCE.useGDXImages) {
newUnit.setImage(newUnit.getCreatures().masterImage);
}
if (newUnit.getCreatures().cards != null) {
//Log.info("DECK TIME");
newUnit.setDeck (new Deck());
for (Cards c : newUnit.getCreatures().cards) {
newUnit.getDeck().addCard(c);
}
}
return newUnit;