thelukester92 / swift-engine

An entity-component-system game engine built in the Swift programming language.
MIT License
35 stars 7 forks source link

Implement a cleaner interface for LGScene #54

Closed thelukester92 closed 10 years ago

thelukester92 commented 10 years ago

LGScene doesn't have to subclass SKScene. It can do what the LGSprite does, which is keep a reference to an SKNode and reference it as needed. This will make it easier to strip out SpriteKit completely if that were ever necessary, as well as keep things clean. LGScene could provide a cleaner entry point than "didMoveToView."

thelukester92 commented 10 years ago

Need an addSystems method and an addEntities method in LGScene.

thelukester92 commented 10 years ago

Make scene not subclassable. Just add hooks in for addSystems and addEntities. Every scene is generic and is created at the top level (in the game view controller).