You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently a GameState is also an object.
This is not ok, a GameState should be a loose collection of objects that doesn't depend on the structure of the Scene Graph, usually.
Eg. a child of the Viewport should be allowed to be in a different GameState than the viewport itself, or the VP should belong to both states.
Also, manually adding Renderable to queues is error prone and not flexible enough, so it would be better to build the layers by traversing the scenegraph when something changes.
After the refactoring:
remove all uses of setChildrenVisible
The text was updated successfully, but these errors were encountered:
Currently a GameState is also an object.
This is not ok, a GameState should be a loose collection of objects that doesn't depend on the structure of the Scene Graph, usually.
Eg. a child of the Viewport should be allowed to be in a different GameState than the viewport itself, or the VP should belong to both states.
Also, manually adding Renderable to queues is error prone and not flexible enough, so it would be better to build the layers by traversing the scenegraph when something changes.
After the refactoring:
The text was updated successfully, but these errors were encountered: