use of com.nyrds.android.util.TrackedRuntimeException in project pixel-dungeon-remix by NYRDS.
the class Blob method seed.
@SuppressWarnings("unchecked")
public static <T extends Blob> T seed(int cell, int amount, Class<T> type) {
try {
T gas = (T) Dungeon.level.blobs.get(type);
if (gas == null) {
gas = type.newInstance();
Dungeon.level.blobs.put(type, gas);
}
gas.seed(cell, amount);
return gas;
} catch (Exception e) {
throw new TrackedRuntimeException(e);
}
}
Aggregations