开发者

How do I run Game1 on click of a button in another form

I'm a beginner programmer and I am trying to get a bit into c# and xna. I was hoping that instead of havin开发者_JAVA百科g the game run immediately (as usual), I wanted to have some sort of a register/login process, although I don't know how to run the game1.cs when the login button is clicked. In a few words, I would like some help with how I can run the:

using (Game1 game = new Game1())
{
    game.Run();
}

on the login-button click in the login form.


Have you considered creating your login-screen using XNA itself instead of employing forms? This way you will be able to deploy your XNA game more easily on different platforms such as the XBox360 and Windows Phone.

A gamestate manager and a keyboard-handler class should help you get well underway and allow much more flexibility for background music, sound and video while logging in.

If you really want to though, there's this article that might help you out.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜