public ROClient() { Singleton = this; graphics = new GraphicsDeviceManager(this); graphics.SynchronizeWithVerticalRetrace = false; // REMOVE ME LATER Window.Title = "Ragnarok Online"; SharedInformation.Initialize(Services, GraphicsDevice); Content = SharedInformation.ContentManager; try { Stream s = Content.Load<Stream>(@"data\fb\config\config.xml"); SharedInformation.Config = Configuration.FromStream(s); s.Close(); } catch { SharedInformation.Config = new Configuration(); } SharedInformation.Config.ReadConfig(); bgmManager = new BGMManager(); effectManager = new EffectManager(); luaManager = new LuaManager(); inputManager = new Nuclex.Input.InputManager(Services, Window.Handle); guiManager = new GuiManager(this); guiManager.DrawOrder = 1000; Components.Add(inputManager); Components.Add(guiManager); Components.Add(new FPSCounter(this)); // REMOVE ME LATER IsFixedTimeStep = false; // REMOVE ME LATER Services.AddService(typeof(InputManager), inputManager); Services.AddService(typeof(GuiManager), guiManager); Services.AddService(typeof(EffectManager), effectManager); Services.AddService(typeof(BGMManager), bgmManager); Services.AddService(typeof(LuaManager), luaManager); graphics.PreferredBackBufferWidth = SharedInformation.Config.ScreenWidth; graphics.PreferredBackBufferHeight = SharedInformation.Config.ScreenHeight; graphics.ApplyChanges(); netState = new NetworkState(); }
public GuiManager(Game game) : base(game) { _singleton = this; }