I'm currently creating a TGame 'singleton' and then using the instance for all my commands
e.g. local mygame:TGame=new TGame
game.update()
game.draw()
Because EVERYTHING is done through that single Game instance it ends up simply passing methods onto other managers (statemanager, mediamanager etc).
It's working OK *BUT* it just seems odd to always have to say game.something().
I am also checking a list of functions which 'wraps' all the various methods which seems to read better :
e.g. InitGame
Loaddata
Update
Draw
To some degree it seems like Bmax where you can use the command (function) or the method (object) to do the same thing. Other than cosmetics what are any other pros/cons of putting everything withing a wrapper object as opposed to everything in a number of wrapper functions?
e.g. local mygame:TGame=new TGame
game.update()
game.draw()
Because EVERYTHING is done through that single Game instance it ends up simply passing methods onto other managers (statemanager, mediamanager etc).
It's working OK *BUT* it just seems odd to always have to say game.something().
I am also checking a list of functions which 'wraps' all the various methods which seems to read better :
e.g. InitGame
Loaddata
Update
Draw
To some degree it seems like Bmax where you can use the command (function) or the method (object) to do the same thing. Other than cosmetics what are any other pros/cons of putting everything withing a wrapper object as opposed to everything in a number of wrapper functions?