protected override void LoadContent() { spriteBatch = new SpriteBatch(GraphicsDevice); PokeGame.font = Content.Load<SpriteFont>("GameTextFont"); ValkyrieWorldManager worldmanager = new ValkyrieWorldManager(new Assembly[] { Assembly.GetExecutingAssembly(), Assembly.Load("ValkyrieLibrary") }); ValkyrieTextureManager texturemanager = new ValkyrieTextureManager(this.Content, this.GraphicsDevice); ValkyrieSoundProvider sound = new ValkyrieSoundProvider(); sound.LoadEngineContext (Engine); this.Engine.Load (new PokeSceneProvider (this.GraphicsDevice, spriteBatch, null), new ValkyrieEventProvider(), new PokeNetworkProvider(), sound, new ValkyrieModuleProvider(), new ValkyrieMovementProvider(), new ValkyrieCollisionProvider(), new ValkyrieVoiceChatProvider (/*sound*/), worldmanager, texturemanager, new ValkyrieSoundManager()); this.Engine.ModuleProvider.AddModule(new MenuModule(Content.Load<Video>("PokemonIntro"))); this.Engine.ModuleProvider.AddModule(new LoginModule()); this.Engine.ModuleProvider.AddModule(new GameModule(this.GraphicsDevice)); this.Engine.ModuleProvider.GetModule("Menu").Load(this.Engine); this.Engine.ModuleProvider.GetModule("Login").Load(this.Engine); this.Engine.ModuleProvider.PushModule("Menu"); this.versionloc = new Vector2 (this.graphics.PreferredBackBufferWidth - (PokeGame.font.MeasureString (this.version).X + 5), this.graphics.PreferredBackBufferHeight - 20); }
protected override void LoadContent() { EditorXNA.font = Content.Load<SpriteFont>("GameTextFont"); EditorXNA.graphicsDevice = this.GraphicsDevice; this.spriteBatch = new SpriteBatch(GraphicsDevice); ValkyrieWorldManager worldmanager = new ValkyrieWorldManager(new XMLMapProvider(new Assembly[] { })); this.Engine.Load(new ValkyrieSceneProvider(this.GraphicsDevice, this.spriteBatch, new MapEditorFogRenderer()), new ValkyrieEventProvider(), new ValkyrieNetworkProvider(), new MapEditorSoundProvider(), new ValkyrieModuleProvider(), new ValkyrieMovementProvider(), new ValkyrieCollisionProvider(), new MapEditorVoiceChatProvider(), worldmanager, new ValkyrieTextureManager(this.Content, this.GraphicsDevice), new ValkyrieSoundManager()); this.Engine.SceneProvider.Cameras.AddItem("camera1", new BaseCamera(this.GraphicsDevice.Viewport.TitleSafeArea) { WorldName = "Default" }); this.Engine.SceneProvider.Cameras["camera1"].CenterOriginOnPoint(0, 0); this.Engine.SceneProvider.Cameras["camera1"].Load(this.GraphicsDevice); this.SelectionSprite = Helpers.FromFile (this.GraphicsDevice, "Graphics/EditorSelection.png"); this.Render.LoadContent(this.GraphicsDevice, this.Engine); foreach (var component in this.componentlist) { component.Value.LoadContent(this.GraphicsDevice, this.Engine); } MapEditorManager.ActionManager = new ActionManager(Engine); }