Closed jwdeveloper closed 3 weeks ago
I found out that this bug only happens when I query by One component. Query with 2 components or more always works
I think I found what was causing the Issue. Every time I was creating new entity, its components was provided in random order, since I was using HashSet to store components. Changing HashSet
to ArrayList
fixed issue, and now components
are provided in same order
It was looked like this:
1: MoveComponent, JumpComponent, RenderComponent
2: JumpComponent, MoveComonent, RenderComponent
3: RenderComponent, JumpComponent, MoveComponent
... and so on
And now:
1: MoveComponent, JumpComponent, RenderComponent
2: MoveComponent, JumpComponent, RenderComponent
3: MoveComponent, JumpComponent, RenderComponent
...
I'm not familiar with Dominion architecture, however I still consider this as a Bug, since I should be able to insert components in any order
ps: This library is amazing, both code, documentation and performance :D
When I query for the
MoveGridComponent
,HideComponent
is returned. They only hint I can give you is that all components I use implementComponent
class, so maybe there is some issue with type Hash calculation?