public void LoadScene(String sceneName) { currentScene = serialiser.LoadScene(sceneName); EngineContentManager.LoadSceneContent(currentScene, game.GraphicsDevice); currentScene.CreateNullBodys(world); currentScene.UpdateNullTextures(); }
public void InitializeCurrentScene() { EngineContentManager.LoadSceneContent(currentScene, game.GraphicsDevice); Engine.GuiManager.ClearControls(); Engine.Gameworld.World.Clear(); currentScene.LoadContent(); }
public void UpdateNullTextures() { foreach (GameObject gameObject in gameObjects) { if (gameObject.Texture == null && gameObject.TextureName != null) { gameObject.Texture = EngineContentManager.GetTexture(gameObject.TextureName); } } }
public Engine(Game aGame, GraphicsDeviceManager aGraphics) { game = aGame; graphics = aGraphics; controlManager = new ControlManager(Mouse.GetState(), Keyboard.GetState()); contentManager = new EngineContentManager(game, game.Content); guiManager = new GUIManager(); gameSpriteBatch = new SpriteBatch(aGraphics.GraphicsDevice); uiSpriteBatch = new SpriteBatch(aGraphics.GraphicsDevice); gameworld = new Gameworld(aGame); }
public void RegisterNewTexture(String name) { this.sceneContent.Add(name); EngineContentManager.LoadSceneTexture(this, name); }