示例#1
0
 protected override void LoadContent()
 {
     // Create a new SpriteBatch, which can be used to draw textures.
     mSpriteBatch = new SpriteBatch(GraphicsDevice);
     mMainMenue.LoadContent(Content);
     mWorld.LoadContent(Content);
 }
        internal static IGameScreenExecution CreateGameScreenExecution(GraphicsDevice graphicsDevice,
                                                                       ContentManager contentManager, ScreenDescription screenDescription)
        {
            IGameScreenExecution execution = null;

            if (screenDescription.Id.Equals(WellKnownGameScreenExecutions.MENUE_MAIN_SCREEN))
            {
                var item   = new MainMenue();
                var screen = GlobalScreenDescriptionCreator
                             .CreateMainScreen(screenDescription.ScreenSizeInformation);
                item.LoadContent(graphicsDevice, contentManager, screen);
                return(item);
            }
            else if (screenDescription.Id.Equals(WellKnownGameScreenExecutions.RUNNING_GAME_BALANCE_SCREEN))
            {
                var item   = new BallBallanceLevel();
                var screen = GlobalScreenDescriptionCreator
                             .CreateTestLevelScreen(screenDescription.ScreenSizeInformation);
                item.LoadContent(graphicsDevice, contentManager, screen);
                return(item);
            }

            return(execution);
        }