コード例 #1
0
ファイル: PreScore.cs プロジェクト: DizWARE/Mr-Gravity
        /*
         * Load
         *
         * Similar to a loadContent function. This function loads and
         * initializes the variable and art used in the class.
         *
         * ContentManager content: the Content file used in the game.
         */
        public void Load(ContentManager content, GraphicsDevice graphics, WorldSelect worldSelect)
        {
            _mContent = content;

            _mScreenRect = graphics.Viewport.TitleSafeArea;

            //            mCurrentLevel = new LevelInfo();
            _current = _mScreenRect.Right;

            _mTrans = content.Load<Texture2D>("Images/Menu/Pause/PausedTrans");
            _mQuartz = content.Load<SpriteFont>("Fonts/QuartzEvenLarger");

            _xCoord = _mScreenRect.Center.X - _mQuartz.MeasureString("COMPLETED DEATH CHALLENGE").X / 2;
            _centerYCoord = _mScreenRect.Center.Y - _mQuartz.MeasureString("COMPLETED TIME CHALLENGE").Y / 2;
            _topYCoord2 = _mScreenRect.Center.Y - _mQuartz.MeasureString("COMPLETED TIME CHALLENGE").Y;
            _bottomYCoord2 = _mScreenRect.Center.Y + _mQuartz.MeasureString("COMPLETED TIME CHALLENGE").Y;
            _topYCoord3 = _mScreenRect.Center.Y - _mQuartz.MeasureString("COMPLETED GEM CHALLENGE").Y * 2;
            _bottomYCoord3 = _mScreenRect.Center.Y + _mQuartz.MeasureString("COMPLETED DEATH CHALLENGE").Y;

            _mScale = 1.0f;

            _pulse = false;
            _upToScale = false;

            _gemString = "COMPLETED GEM CHALLENGE!";
            _timeString = "COMPLETED TIME CHALLENGE!";
            _deathString = "COMPLETED DEATH CHALLENGE!";

            _mDoOnce = false;

            StarList = new List<string>();
            StarList.Clear();

            _mWorldSelect = worldSelect;
        }
コード例 #2
0
ファイル: Scoring.cs プロジェクト: DizWARE/Mr-Gravity
 /*
  * Update
  *
  * Updates the menu depending on what the user has selected.
  * It will handle the title, options, load and all other menu
  * screens
  *
  * GameTime gameTime: The current game time variable
  */
 public void Update(GameTime gameTime, ref GameStates gameState, ref Level level, WorldSelect worldSelect)
 {
     if (_mControls.IsStartPressed(false) || _mControls.IsAPressed(false))
     {
         gameState = GameStates.AfterScore;
     //#if XBOX360
     //                mSelect.Save(((ControllerControl)mControls).ControllerIndex);
     //#else
     //                mSelect.Save(PlayerIndex.One);
     //#endif
     }
 }
コード例 #3
0
 public void startGame()
 {
     sceneToLoad = WorldSelect.WorldToLoad();
     SceneManager.LoadScene(sceneToLoad);
 }
コード例 #4
0
ファイル: Scoring.cs プロジェクト: DizWARE/Mr-Gravity
        /*
         * Load
         *
         * Similar to a loadContent function. This function loads and
         * initializes the variable and art used in the class.
         *
         * ContentManager content: the Content file used in the game.
         */
        public void Load(ContentManager content, GraphicsDevice graphics, WorldSelect worldSelect)
        {
            _mWorldSelect = worldSelect;
            _mContent = content;
            _mKootenay = content.Load<SpriteFont>("Fonts/Kootenay");
            _mQuartz = content.Load<SpriteFont>("Fonts/QuartzLarge");

            _mScreenRect = graphics.Viewport.TitleSafeArea;

            _mTitle = content.Load<Texture2D>("Images/Menu/Mr_Gravity");
            _mBackground = content.Load<Texture2D>("Images/Menu/backgroundSquares1");
            _mStar = content.Load<Texture2D>("Images/AnimatedSprites/YellowStar");
        }