litiengine
litiengine copied to clipboard
Allow adding custom Triggers without having to write a customMapObjectLoader
The CreatureMapObjectLoader
provides a convenient, reflection-based way to register custom Creature
types, see this example:
CreatureMapObjectLoader.registerCustomCreatureType(Zombie.class);
This way, the developer doesn't need to write a custom MapObjectLoader
when extending the base Creature
type (in this case, with a Zombie
).
The same behaviour would be desirable for Trigger
s and, in fact, any other kind of MapObject
that is extended frequently.
Maybe we should even consider making MapObjectLoader
s generic in general.