Exemple #1
0
        public static bool InitializeEngine()
        {
            NetworkSocket.Initialize();

            try {
                background            = new EngineObject($"{Common.Configuration.GamePath}/Data/background.png", 1024, 768);
                background.Size       = new Size2(1024, 768);
                background.SourceRect = new Rectangle(0, 0, 1024, 720);


                DataManager.Initialize();

                WindowTalent.Initialize();
                WindowSkill.Initialize();
                WindowPin.Initialize();
                WindowCash.Initialize();
                WindowMail.Initialize();
                WindowSelectedItem.Initialize();
                WindowViewTalent.Initialize();

                //Carrega os dados de classe.
                ClasseManager.Initialize();

                //Carrega os dados de npc.
                NpcManager.OpenData();

                //Carrega os dados de experiencia
                ExperienceManager.Read();

                EngineFont.Initialize();
                EngineMessageBox.Initialize();
                EngineInputBox.Initialize();
                EngineMultimedia.Initialize();

                WindowLogin.Initialize();
                WindowServer.Initialize();
                WindowCharacter.Initialize();
                WindowNewCharacter.Initialize();

                WindowGame.Initialize();

                WindowViewItem.Initialize();

                //    EngineMultimedia.PlayMusic(0, true);

                GameState = 1;
                return(true);
            }
            catch (Exception ex) {
                MessageBox.Show(ex.Message);
                return(false);
            }
        }