Ejemplo n.º 1
0
        public DifficultyState()
            : base()
        {
            var buttonTexture = TextureFactory.GetTexture("Controls/Button");
            var buttonFont    = TextureFactory.GetSpriteFont("Fonts/Font");

            this.selectDifficultyTexture  = TextureFactory.GetTexture("Titles/SELECT");
            this.selectDifficultyTexture2 = TextureFactory.GetTexture("Titles/DIFFICULTY");

            var bossButton = new Button(buttonTexture, buttonFont)
            {
                Position = new Vector2(2, 300),
                Text     = "Boss",
            };

            bossButton.Click += this.BossButton_Click;

            var newGameEasyButton = new Button(buttonTexture, buttonFont)
            {
                Position = new Vector2(161, 450),
                Text     = "Easy",
            };

            newGameEasyButton.Click += this.NewGameEasyButton_Click;

            var newGameNormalButton = new Button(buttonTexture, buttonFont)
            {
                Position = new Vector2(161, 500),
                Text     = "Normal",
            };

            newGameNormalButton.Click += this.NewGameNormalButton_Click;

            var newGameHardButton = new Button(buttonTexture, buttonFont)
            {
                Position = new Vector2(161, 550),
                Text     = "Hard",
            };

            newGameHardButton.Click += this.NewGameHardButton_Click;

            var returnButton = new Button(buttonTexture, buttonFont)
            {
                Position = new Vector2(161, 600),
                Text     = "Main Menu",
            };

            returnButton.Click += this.QuitGameButton_Click;

            this.components = new List <Component>()
            {
                newGameEasyButton,
                newGameNormalButton,
                newGameHardButton,
                returnButton,
                bossButton,
            };
        }