So im rewriting some of my code trying to make it less cumbersome. I keep running into a situation where I would need less components attached to objects in general if I could have a filter that excludes entities with certain components. One situation is:
I have a series of stage elements with colliding hitboxes, however some of these stage elements can save an entity in an ArrayList. This is for things such as a moving platform, so it can move other entities that are resting on top along with it when it moves. something that can be “grounded” will check if it is on top of a normal stage element (so it can do something like jump), but also check with if it is grounded on something that can save entities.
The problem is I do not want to do the check Twice.
this.stationarySet = ed.getEntities(RectCollider.class, Stage.class); this.attachedSet = ed.getEntities(RectCollider.class, Attached.class);
I would like to mention in stationarySet that I do notthings with an Attached.class