예제 #1
0
        private void StartEngine()
        {
            Prepare();
            Configure();

            using (UltimaEngine engine = UltimaServices.GetService <UltimaEngine>())
            {
                engine.Run();
            }
        }
예제 #2
0
        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();
        }
예제 #3
0
 public void Unload()
 {
     UltimaServices.Unregister <UltimaEngine>(m_Engine);
 }
예제 #4
0
 public void Load()
 {
     m_Engine = UltimaServices.Register <UltimaEngine>(new UltimaEngine());
 }