Пример #1
0
        public override void LoadContent()
        {
            // load the fancy title effects
              LoadTitleContent();

              // create the wheel menu
              GraphicsDevice device = ScreenManager.GraphicsDevice;
              scale = (float)device.Viewport.Height / 1080f;

              ContentManager content = ScreenManager.Game.Content;

              Camera camera = new Camera( MathHelper.PiOver4, device.Viewport.AspectRatio,
                                  1f, 100f, new Vector3( 0, 3f, 10 ), new Vector3( 0, 3f, 0 ) );

              // this should prevent spikes in sign-in screen when creating first avatar
              new Avatar( AvatarDescription.CreateRandom(), AvatarAnimationPreset.Stand0,
                                                  1f, Vector3.UnitZ, Vector3.Zero );

              float wheelScale = 3f; // 2.5f old
              wheelMenu = new WheelMenu( this, camera, wheelScale, scale, -3, 0, 3, wheelScale / 2 );

              if ( Guide.IsTrialMode )
            WheelMenu.EntryActiveScale = 1.4f;
              else
            WheelMenu.EntryActiveScale = 1.75f;

              WheelMenuEntry entry;
              wheelMenu.AcceptingInput = false;

              entry = new WheelMenuEntry( wheelMenu, content.Load<Texture2D>( "Textures/playText" ) );
              entry.Selected += PlayMenuEntrySelected;
              wheelMenu.AddEntry( entry );

              if ( Guide.IsTrialMode )
              {
            entry = new WheelMenuEntry( wheelMenu, content.Load<Texture2D>( "Textures/buyText" ) );
            entry.Selected += GameCore.Instance.ShowBuy;
            entry.IsBuyOption = true;
            wheelMenu.AddEntry( entry );
              }

              entry = new WheelMenuEntry( wheelMenu, content.Load<Texture2D>( "Textures/howToPlayText" ) );
              entry.Selected += HowToPlayMenuEntrySelected;
              wheelMenu.AddEntry( entry );

              entry = new WheelMenuEntry( wheelMenu, content.Load<Texture2D>( "Textures/leaderboardText" ) );
              entry.Selected += LeaderboardMenuEntrySelected;
              wheelMenu.AddEntry( entry );

              entry = new WheelMenuEntry( wheelMenu, content.Load<Texture2D>( "Textures/optionsText" ) );
              entry.Selected += OptionsMenuEntrySelected;
              wheelMenu.AddEntry( entry );

              entry = new WheelMenuEntry( wheelMenu, content.Load<Texture2D>( "Textures/creditsText" ) );
              entry.Selected += CreditsMenuEntrySelected;
              wheelMenu.AddEntry( entry );

              entry = new WheelMenuEntry( wheelMenu, content.Load<Texture2D>( "Textures/exitText" ) );
              entry.Selected += OnCancel;
              wheelMenu.AddEntry( entry );

              MenuItems.Add( wheelMenu );

              signInMenuScreen = new SignInMenuScreen( ScreenManager );
              controlsMenuScreen = new ControlsMenuScreen( ScreenManager );
              optionsMenuScreen = new OptionsMenuScreen( ScreenManager );
              creditsMenuScreen = new CreditsMenuScreen( ScreenManager );
              highscoreScreen = new HighscoreScreen( ScreenManager );

              // pre-load other stuff here
              content.Load<Texture2D>( "Textures/messageBox" );
        }
Пример #2
0
 public void AddEntry( WheelMenuEntry entry )
 {
     entries.Add( entry );
 }