New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integration between GameEngine and Rendering #9
Conversation
…-star-dash into feat/rendering
…-star-dash into feat/rendering
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GameBridge
looking beautiful!
LGTM |
} | ||
|
||
func sync(entity: Entity, from object: SDObject) { | ||
guard let positionComponent = entityManager.component(ofType: PositionComponent.self, of: entity.id) else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the syncing be done through system manager? I did create a sync function in the position and physics systems (parameters may not be the same but that can easily be fixed in systems).
Works either way to be honest. But i just thought that systems are responsible for transforming component data.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this approach makes for better design since our game engine has one less responsibility and reduced coupling to the physics engine.
Changes:
Note:
GameEngine.EntityManager
as non-private to create the test game scene from view controllerTextureComponent
is to-be-updatedforce
attribute, commented out temporarilyPhysicsComponent
is to-be-updated to expose shapes of physics body