Open AnderWoche opened 2 weeks ago
Hi, I don't have time for this at the moment but feel free to open a PR for it. Making the bag open will not do any harm 😉
What exactly is your entity removal doing? Doing an array copy every time you remove an entity feels highly inefficient?
I implemented it this way because I needed the same behavior as with an arrayList.
I didn't use a normal ArrayList because I wanted to use the EntityBag interface so that I could use the entities from the families without having to do any conversions beforehand.
I will sit down and try to make a pull request.
I have a small question, Why is everything in just one file? Is it more performant?
would it be bad if I put MutableEntityBag in an extra file?
Ohh .wait....
I don't think that this has anything to do with performance. It is just my personal preference that I group things that belong together in one file. However, if a file gets to big I split it up like I did it recently with world and world configuration if I remember correctly.
But feel free to extract the interface into a separate file. It has a lot of methods and might be better to move it into a separate file.
Btw, if you have time, can you also add the single()
method please? I just discovered that method a few days ago and it is a cleaner version of first
in some scenarios.
Lets make MutableEntityBag open so i can override it and make my SortedMutableEntityBag
Important is how entities are delete: i need this way:
i want to override minusAssign