protected override void Initialize() { ResourceManager.EmbeddedPrefix = "VoxelSpace.res."; ResourceManager.AddLoader(new Texture2DLoader(GraphicsDevice)); ResourceManager.AddLoader(new EffectLoader(GraphicsDevice)); G.Initialize(this); UI.UI.Initialize(Window); Input.MouseUtil.Initialize(this); var rect = Window.ClientBounds; rect.Width += rect.X; rect.Height += rect.Y; base.Initialize(); }
public Application() { Game = new GameLogic(1024, 768, resourceManager); Views = new List <IGameView>(); Views.Add(new PlayerView(Game)); Views.Add(new AiView(Game)); resourceManager.AddLoader(new DummyLoader()); #if DEBUG resourceManager.AddWiper(new DebugWiper()); #endif resourceManager.AddWiper(new FileUpdater()); Game.EventManager.Queue(GameStateChangedEvent.To(GameState.StartUp)); Game.EventManager.Queue(GameStateChangedEvent.To(GameState.Menu)); registerGameEventListeners(); }
protected override void LoadContent() { base.LoadContent(); // Add loaders ResourceManager.AddLoader("ROOM", new RoomLoader()); ResourceManager.AddLoader("RMIM", new RoomImageLoader(GraphicsDevice)); ResourceManager.AddLoader("OBIM", new ObjectImageLoader(GraphicsDevice)); ResourceManager.AddLoader("SCRP", new ScriptLoader(ScriptManager, SceneManager, ScummState, this.logFile)); ResourceManager.AddLoader("STRN", new StringLoader()); ResourceManager.AddLoader("CHRS", new CharsetLoader(GraphicsDevice)); ResourceManager.AddLoader("COST", new CostumeLoader(GraphicsDevice)); ResourceManager.AddLoader("VERB", new VerbLoader()); ResourceManager.AddLoader("OBJC", new ObjectLoader()); // Read game files ResourceManager.LoadGame(); this.ScriptManager.Run(456); }