This project is read-only.

State management

Sep 24, 2010 at 4:36 PM

Hi all,

Am in the process of porting my XNA game to SilverLight using SilverSprite. For the most part I've succeeded except for some glitches related to state management. Am using Chad Carter's State Management from his book XNA Game studio 3.0 unleashed. There is a State manager that keeps a stack of components with pushing and popping components onto and off the stack as needed. The problem I am having is that the components don't seem to be initialized immediately when they are added but sometime later. So the components that don't need initialization right away seem to work ok but the others don't.

Can anyone tell me when the added component is initialized? By the way my game works fine in XNA windows.


Sep 26, 2010 at 2:43 PM

Further to state management problems. There seems to be a problem with the 'visible' and 'enabled' properties of game components. As I understand it, when the 'visible' property is true the component will draw and when the 'enabled' property is true the update method will execute. I need components to be drawn but not enabled. When 'enabled' is false the component does not draw. Again this works in windows but not in SilverSprite. Is this a bug or is there a work around.