Exemplo n.º 1
0
        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();
        }
Exemplo n.º 2
0
 public GuiManager(Game game)
     : base(game)
 {
     _singleton = this;
 }
Exemplo n.º 3
0
 public GuiManager(Game game)
     : base(game)
 {
     _singleton = this;
 }