public static void ChangeScene(Scene newScene) { loadingScene = true; newScene.LoadContent(StaticContent); newScene.Initialize(); currentScene = newScene; loadingScene = false; }
protected override void Initialize() { viewport = GraphicsDevice.Viewport; TileEngine.InitializeEngine(); AudioManager.Initialize(); //Later replace with something else. IsMouseVisible = true; //Load the tileset here so the map can be properly loaded. new Tileset(Content.Load<Texture2D>("levelTileset")); //Let the audio manager load all relevant assets itself AudioManager.LoadContent(Content); // If you want to make changes to the game map, uncomment the following line and then comment out the // two lines that follow it. Make any changes you like to the map, and then click the save button to // automatically write to map.gtd. Afterwards, swap the commented lines once more. //currentScene = new MapEditorScene(); currentScene = new OpeningMovieScene(); currentScene.LoadContent(Content); base.Initialize(); }