protected override void Initialize() { Content.RootDirectory = "Content"; Service.Add(this); Service.Add(new SpriteBatch3D(this)); Service.Add(new SpriteBatchUI(this)); Service.Add <INetworkClient>(new NetworkClient()); Service.Add <IInputService>(new InputService(Window.Handle)); Service.Add(new AudioService()); m_UserInterface = Service.Add(new UserInterfaceService()); m_Plugins = new PluginManager(AppDomain.CurrentDomain.BaseDirectory); m_Models = new ModelManager(); // Make sure we have a UO installation before loading IO. if (FileManager.IsUODataPresent) { // Initialize and load data IResourceProvider provider = new ResourceProvider(this); provider.RegisterResource(new EffectDataResource()); Service.Add(provider); HueData.Initialize(GraphicsDevice); SkillsData.Initialize(); GraphicsDevice.Textures[1] = HueData.HueTexture0; GraphicsDevice.Textures[2] = HueData.HueTexture1; m_IsRunning = true; WorldModel.IsInWorld = false; Models.Current = new LoginModel(); } else { Tracer.Critical("Did not find a compatible UO Installation. JuicyUO is compatible with any version of UO through Mondian's Legacy."); } }
protected override void Initialize() { Content.RootDirectory = "Content"; // register this instance as a service ServiceRegistry.Register <UltimaGame>(this); // Create all the services we need. ServiceRegistry.Register <SpriteBatch3D>(new SpriteBatch3D(this)); ServiceRegistry.Register <SpriteBatchUI>(new SpriteBatchUI(this)); ServiceRegistry.Register <AudioService>(new AudioService()); Network = ServiceRegistry.Register <INetworkClient>(new NetworkClient()); Input = ServiceRegistry.Register <InputManager>(new InputManager(Window.Handle)); UserInterface = ServiceRegistry.Register <UserInterfaceService>(new UserInterfaceService()); Plugins = new PluginManager(AppDomain.CurrentDomain.BaseDirectory); // Make sure we have a UO installation before loading IO. if (FileManager.IsUODataPresent) { // Initialize and load data IResourceProvider provider = new ResourceProvider(this); provider.RegisterResource <EffectData>(new EffectDataResource()); ServiceRegistry.Register <IResourceProvider>(provider); HueData.Initialize(GraphicsDevice); SkillsData.Initialize(); GraphicsDevice.Textures[1] = HueData.HueTexture0; GraphicsDevice.Textures[2] = HueData.HueTexture1; IsRunning = true; WorldModel.IsInWorld = false; ActiveModel = new LoginModel(); } else { Tracer.Critical("Did not find a compatible UO Installation. UltimaXNA is compatible with any version of UO through Mondian's Legacy."); } }
protected override void Initialize() { Content.RootDirectory = "Content"; // Create all the services we need. UltimaServices.Register <SpriteBatch3D>(new SpriteBatch3D(this)); UltimaServices.Register <SpriteBatchUI>(new SpriteBatchUI(this)); Network = UltimaServices.Register <INetworkClient>(new NetworkClient()); Input = UltimaServices.Register <InputManager>(new InputManager(Window.Handle)); UserInterface = UltimaServices.Register <UserInterfaceService>(new UserInterfaceService()); // Make sure we have a UO installation before loading IO. if (!FileManager.IsUODataPresent) { return; } // Initialize and load data AnimData.Initialize(); Animations.Initialize(GraphicsDevice); ArtData.Initialize(GraphicsDevice); ASCIIText.Initialize(GraphicsDevice); TextUni.Initialize(GraphicsDevice); GumpData.Initialize(GraphicsDevice); HuesXNA.Initialize(GraphicsDevice); TexmapData.Initialize(GraphicsDevice); StringData.LoadStringList("enu"); SkillsData.Initialize(); GraphicsDevice.Textures[1] = HuesXNA.HueTexture0; GraphicsDevice.Textures[2] = HuesXNA.HueTexture1; EngineVars.EngineRunning = true; EngineVars.InWorld = false; ActiveModel = new LoginModel(); }