Example #1
0
        public override void Activate()
        {
            //Only create a new content if we dont have one allready
            //Good to have this check as we will Activate and Deactivate GamePlayScreen's a fair bit
            if (content == null)
                content = new ContentManager(ScreenManager.Game.Services, "Content");

            if(gameManager == null)
                gameManager = new GameManager();

            gameManager.Initialize();
            gameManager.mapManager.graphicsDevice = ScreenManager.Game.GraphicsDevice;
            GameManager.RestarLevel();
        }
Example #2
0
        public DefeatedScreen(GameManager gameManager)
            : base("")
        {
            GameManager = gameManager;

            MenuButton = new MenuButton(new MenuButtonStyle(ScreenManager.Game.Content));
            LevelSelectButton = new MenuButton(new LevelSelectStyle(ScreenManager.Game.Content));
            RestartButton = new MenuButton(new RestartButtonStyle(ScreenManager.Game.Content));

            MenuEntries.Add(MenuButton);
            MenuEntries.Add(LevelSelectButton);
            MenuEntries.Add(RestartButton);

            TitleTexture = ScreenManager.Game.Content.Load<Texture2D>("GUI Textures/DefeatedScreen/DefeatedTitle");

            IsPopup = true;
        }