static void Main() { /* Application.EnableVisualStyles(); * Application.SetCompatibleTextRenderingDefault(false); * Application.Run(new Form1());*/ var game = new GameObject("Mario"); new ResourceProxy().LoadSpriteSheetFromFile("sm-mario-sprites", @"resources\sm-mario-sprites.png", 10); new ResourceProxy().LoadFontFromFile("arial", @"resources\arial.ttf"); // Build the startup menu scene MainScene s = new MainScene(game); s.Name = "play"; //s.BackgroundTexture = new ResourceManager().GetTexture("start"); game.SceneManager.AddScene(s); StartScene s2 = new StartScene(game); s2.Name = "start"; game.SceneManager.AddScene(s2); GameOverScene s3 = new GameOverScene(game); s3.Name = "gameover"; game.SceneManager.AddScene(s3); // Start the game game.SceneManager.StartScene("start"); }
static void Main() { var game = new GameObject("Mario"); ResourceManager.GetInstance().LoadSpriteSheetFromFile("mario", @"resources\mario.png", 10); MainScene s = new MainScene(game); s.Name = "play"; game.SceneManager.AddScene(s); GameOver gameOver = new GameOver(game); gameOver.Name = "gameover"; game.SceneManager.AddScene(gameOver); game.SceneManager.StartScene("gameover"); }