I have a game with lots of entities, I would like to toggle visibility of certain entities since they are now starting to overlap and pile up.
At the moment I can only toggle all entities' visibility. Can I split them into different layers?
Secondly - Can I give some entities a different background? I know of _wmBoxColor - but it would be great to attach a Weltmeister-only background, so at a glance, I can tell which entity is which
I don't think you can do what you're asking unless you make some modifications. I think there can only be one Entities layer.
As for a WM-only background, you could put something in your entity like this to detect when you are in Weltmeister and show a different sprite:
if (ig.global.wm) this.currentAnim = this.anims.wm_enemy; // a special sprite for enemies only shown in Weltmeister
You can almost certainly modify WM to do that. You have the source, so making the change just depends on how useful that functionality would be to you relative to the time it'd take to implement.
In all likelihood, it wouldn't be particularly difficult, you'd just have to follow through... though a particularly hacky way to go about it would be to leave the "main" entities layer alone, and implement sublayers that also automatically add the entities that are in them to the "main" layer. That way, you can probably get away with not touching code related to making the JSON for the levels and all that (Though you'd still need a way to load your entities into the appropriate sublayers when you reload your level in WM, though that could just boil down to a flag in your entities).
Page 1 of 1
« first
« previous
next ›
last »