Пример #1
0
        //Load and Unload
        public bool LoadContent()
        {
            //Texture
            m_background = m_contentManager.Load <Texture2D>("GUI/MainMenu/background");
            m_logo       = m_contentManager.Load <Texture2D>("GUI/MainMenu/ScraffyLogo");
            m_foreground = m_contentManager.Load <Texture2D>("GUI/MainMenu/foreground-light");

            m_cloud1    = m_contentManager.Load <Texture2D>("GUI/MainMenu/cloud1");
            m_cloud1Pos = new Vector2(0, 312);

            m_cloud2    = m_contentManager.Load <Texture2D>("GUI/MainMenu/cloud2");
            m_cloud2Pos = new Vector2(774, 359);

            m_scraffyFrame1 = m_contentManager.Load <Texture2D>("GUI/MainMenu/Scraffy/frame1");
            m_scraffyFrame2 = m_contentManager.Load <Texture2D>("GUI/MainMenu/Scraffy/frame2");
            m_scraffyFrame3 = m_contentManager.Load <Texture2D>("GUI/MainMenu/Scraffy/frame3");

            m_scraffyAnim = ScraffyAnim.Frame1;

            //Ini Best Score
            ReadFileContentsAsync("bestScore.txt");

            //Ini Button
            m_playButton.initialized(m_contentManager, "GUI/MainMenu/Button/playButtonTexture", 320, 520, 72, 440, 74, 440, 440, 0);
            m_scoresButton.initialized(m_contentManager, "GUI/MainMenu/Button/scoresButtonTexture", 320, 520 + 150, 72, 440, 74, 440, 440, 0);
            m_optionButton.initialized(m_contentManager, "GUI/MainMenu/Button/optionButtonTexture", 320, 520 + 150 * 2, 72, 440, 74, 440, 440, 0);
            m_creditButton.initialized(m_contentManager, "GUI/MainMenu/Button/creditButtonTexture", 320, 520 + 150 * 3, 72, 440, 74, 440, 440, 0);

            return(true);
        }
        //Load and Unload
        public bool LoadContent()
        {
            //Texture
            m_background = m_contentManager.Load <Texture2D>("GUI/GameOver/background");
            m_logo       = m_contentManager.Load <Texture2D>("GUI/GameOver/gameover");

            //Button
            m_restartButton.initialized(m_contentManager, "GUI/GameOver/Button/restart", 139, 517, 72, 440, 74, 440, 440, 0);
            m_exitButton.initialized(m_contentManager, "GUI/GameOver/Button/exit", 139, 807, 72, 440, 74, 440, 440, 0);

            ReadFileContentsAsync("bestScore.txt");

            return(true);
        }