Exemplo n.º 1
0
        protected override void Initialize()
        {
            Content.RootDirectory = "Content";

            // Create all the services we need.
            Client = new UltimaClient(this);
            Client.IsLoggingPackets = true;
            Input         = new InputManager(Window.Handle);
            UserInterface = new GUIManager(this);

            // Load vars from Settings.ini.
            UltimaVars.SettingVars.Load();

            // Make sure we have a UO installation before loading UltimaData.
            if (UltimaData.FileManager.IsUODataPresent)
            {
                // Initialize and load data
                UltimaData.AnimData.Initialize();
                UltimaData.Animations.Initialize(GraphicsDevice);
                UltimaData.ArtData.Initialize(GraphicsDevice);

                UltimaData.FontsOld.ASCIIText.Initialize(GraphicsDevice);
                UltimaData.FontsNew.TextUni.Initialize(GraphicsDevice);

                UltimaData.GumpData.Initialize(GraphicsDevice);
                UltimaData.HuesXNA.Initialize(GraphicsDevice);
                UltimaData.TexmapData.Initialize(GraphicsDevice);
                UltimaData.StringData.LoadStringList("enu");
                UltimaData.SkillsData.Initialize();
                GraphicsDevice.Textures[1] = UltimaXNA.UltimaData.HuesXNA.HueTexture0;
                GraphicsDevice.Textures[2] = UltimaXNA.UltimaData.HuesXNA.HueTexture1;

                UltimaVars.EngineVars.EngineRunning = true;
                UltimaVars.EngineVars.InWorld       = false;

                ActiveModel = new UltimaLogin.LoginModel();
            }
        }
Exemplo n.º 2
0
 public static void Initialize(UltimaClient client)
 {
     s_Client = client;
 }