litiengine icon indicating copy to clipboard operation
litiengine copied to clipboard

Allow adding custom Triggers without having to write a customMapObjectLoader

Open nightm4re94 opened this issue 4 years ago • 1 comments

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 Triggers and, in fact, any other kind of MapObject that is extended frequently.

nightm4re94 avatar Jan 05 '20 13:01 nightm4re94

Maybe we should even consider making MapObjectLoaders generic in general.

nightm4re94 avatar Jan 05 '20 14:01 nightm4re94