Exemplo n.º 1
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            Log.EnableConsoleLog = true;
            Log.SendMessage("CLR: " + Environment.Version);
            Log.SendMessage("Machine Name: " + Environment.MachineName);
            Log.SendMessage("RAM for process (bytes): " + Environment.WorkingSet);
            Log.SendMessage("Number of processors: " + Environment.ProcessorCount);
            Log.SendMessage("OS x64: " + Environment.Is64BitOperatingSystem);
            Log.SendMessage("Process x64: " + Environment.Is64BitProcess);
            Log.SendMessage("OS: " + Environment.OSVersion.VersionString);
            //Log.EnableFileLog = true;

            Config.LoadConfigFile();

            ScreenWidth  = Window.ClientBounds.Width;
            ScreenHeight = Window.ClientBounds.Height;

            LoadingBr = new ScreenBr(new Vector2(ScreenWidth, ScreenHeight), 60, 255, GraphicsDevice, 0.001f);
            LoadingBr.CurrentFrame = 59;

            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            GameContent.LoadGameContent();
            _GlobalState = GlobalGameState.MainMenu;
            mainMenu     = new MainMenu(new Vector2(ScreenWidth, ScreenHeight), GameContent.UI_MainMenu_LogIn_BackGround, GameContent.UI_MainMenu_LogIn_Button, GameContent.UI_MainMenu_LogIn_EditBox, GameContent.UI_MainMenu_LogIn_ConnIcon, GameContent.UI_MainMenu_MenuBar, GameContent.UI_MainMenu_Button, GameContent.UI_MainMenu_HomeButton, GameContent.UI_MainMenu_MoneyBack, GameContent.UI_MainMenu_RollBack, GameContent.UI_MainMenu_NameBack, GameContent.UI_InfoFont, Color.Black, GraphicsDevice, this, 0.1f);
            //gameState = new GameState(ScreenWidth, ScreenHeight, GraphicsDevice);

            KeyBindings.RegisterKeyBind("KEY_MENU", Keys.Escape);
            Menu = new GameMenu(new Vector2(ScreenWidth, ScreenHeight), this, GameContent.UI_GameMenu_MainBack, GameContent.UI_GameMenu_OptionsBack, GameContent.UI_GameMenu_Button, GameContent.UI_GameMenu_ListBoxBtn, GameContent.UI_GameMenu_ListBoxChoosed, GameContent.UI_GameMenu_ListBoxOpenBtn, GameContent.UI_InfoFont, Color.Black, 0.1f);
            Menu.Hide(null, gameState, null);
        }