0

I am making a game in XNA but wish to port it over to Silverlight XNA. In XNA, there is a graphics object at class level which is of type GraphicsDeviceManager. In Silverlight XNA however, there is no such thing. What shall I do in this case? I need it since I am passing over stuff like ViewPort.Width etc etc to some game objects so i know where to place them.

Any help will be highly appreciate.

4

1 回答 1

1

Ah. I have managed to find out that there is an equivalent in Silverlight XNA. It's called SharedGraphicsDeviceManager. I'm just passing over SharedGraphicsDeviceManager.Current.GraphicsDevice.Viewport to the classes and then applying logic appropriately to the objects position.

于 2013-03-31T00:24:39.400 回答