May 13, 2011 at 2:20 AM
Edited May 13, 2011 at 4:33 AM
Thanks a lot for answers and sample project . SharedSpriteBatch now works perfectly.
Now, reading you, I would like to integrate the nuclex GameStateManager with ninject & components, maybe you could enlighten me !
I m working on a simple proof of concept :
- WelcomeGameState , just does debug.writeln("Hello") in the update loop, and then activate the playingGameState.
- PlayingGameState is using a FPS Component and a HudComponent, could as well be 2 different hello world components. In reality it will be skydomeComponent + FPSCompo + DiagnosticsCompo + WorldCompo + ...
I tried for few hours, but i m lost for few reasons :
- where should the GameStateManager be plugged, plain old new in testGame, wired with the kernel in testGame, something with gameservices, or in program.prepgame() instead of components ?
- gamestate doesnt have a list of components, should I create my own gamestate base class with a list of components to update & draw ?
Note that when I m satisfied enough, I will push this code to the opensource TechCraft project, so you will be able to see the results of a nuclex / ninject integration in another project ; )