Beispiel #1
0
 public void LoadScene(String sceneName)
 {
     currentScene = serialiser.LoadScene(sceneName);
     EngineContentManager.LoadSceneContent(currentScene, game.GraphicsDevice);
     currentScene.CreateNullBodys(world);
     currentScene.UpdateNullTextures();
 }
Beispiel #2
0
 public void InitializeCurrentScene()
 {
     EngineContentManager.LoadSceneContent(currentScene, game.GraphicsDevice);
     Engine.GuiManager.ClearControls();
     Engine.Gameworld.World.Clear();
     currentScene.LoadContent();
 }
Beispiel #3
0
 public void UpdateNullTextures()
 {
     foreach (GameObject gameObject in gameObjects)
     {
         if (gameObject.Texture == null && gameObject.TextureName != null)
         {
             gameObject.Texture = EngineContentManager.GetTexture(gameObject.TextureName);
         }
     }
 }
Beispiel #4
0
 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);
 }
Beispiel #5
0
 public void RegisterNewTexture(String name)
 {
     this.sceneContent.Add(name);
     EngineContentManager.LoadSceneTexture(this, name);
 }