using (Game2 game = new Game2())
{
game.Run();
}
Where Game1 is defined like this. public class Game2 : Microsoft.Xna.Framework.Game
Now im trying to call it inside of another update loop.
So its got the main game running and then when i want to load this "Game2" inside the update loop of the first.
The idea was to start one game when a certain button was pressed and then it would run and not return to the update loop it was called from until it quit and when it did the first loop would just keep going.
So then i would kinda be able to step in and step out of different "Games"
But it gives me this error during runtime.
"Starting a second message loop on a single thread is not a valid operation."
Now i understand that why its happening (I think) (Because the message pump thing is sending messages to only the first and thats what the microsoft xna Game class plugs into???)
But i can't think of a way around it.. Any way would do.
Also i tryed opening it up in another thread and that just creates a 2nd window with the first and second both running...
Edited by Jaan, 09 July 2009 - 06:56 AM.
Please use code tags when you are posting your codes!


Sign In
Create Account

Back to top









