I am currently working on a Map Editor for my 3D game, but I am having some problems getting the using Microsoft.Xna.Framework.Game included.
My 3D engine is stored in a library, and the constructor for it needs the Game instance and a GraphicsDevice.
The GraphicsDevice is not a problem since i used some example from App Hub (link text), but using the “Game” is not included in it. Does anyone know how I would fix this? Thanks 🙂
Pretty much the entire point of the WinForms sample is to remove the use of
Game(and theMicrosoft.Xna.Framework.Gameassembly). The Game class does things that you probably do not want to have happen within your editor.I would recommend modifying your 3D engine so that it does not require an instance of the Game class, in order to be created.
What are you using from Game, anyway? A
ContentManager, perhaps? Just pass that in directly.But if you really must reference the Game class, add a reference to the Microsoft.Xna.Framework.Game assembly to your project. Do this by right clicking the project in the solution explorer, selecting Add Reference and finding it in the list of .NET assemblies. Make sure you get correct version.