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
Feat/extend background image #52
Conversation
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.
lgtm
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.
The overall implementation looks good and I appreciate the refactoring of the initialisation of GameEngine, GameScene and others.
But I feel that there needs be a larger refactoring around the initialisation of the GameEngine itself. The loading of map entities, creation of player entities and creation of background image should probably not be the responsibility of the view controller... But I understand if this should be in another PR or if u would like to resolve it in this PR would be good too!
@@ -37,17 +40,24 @@ class ViewController: UIViewController { | |||
self.renderer = renderer | |||
} | |||
|
|||
func setupGameEntities() { | |||
private func createGameEngine() -> GameEngine { | |||
let levelSize = self.storageManager?.getLevelSize(id: 0) ?? CGSize(width: 4_842, height: 1_040) |
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 the id here should be consistent with method setupGameEntities
, by passing a variable?
I agree that the game engine should handle the setting up of the entities, I will resolve this in the pr for Home Screen as it requires a refactoring of the game engine to set up the game |
Resolves #37