Beispiel #1
0
        public void init(Microsoft.Xna.Framework.Content.ContentManager Content, Action inGameCallback, Action backToMenuCallback, Action reinitCallback)
        {
            base.init(Content);
            sideMenuBack = Content.Load <Texture2D>(".\\Sprites\\GUI\\backMenuShape");


            soundButton = new SoundButton(inGameCallback);
            soundButton.init(Content);

            homeButton = new HomeButton(backToMenuCallback);
            homeButton.init(Content);

            backButton = new BackButton(reinitCallback);
            backButton.init(Content);

            playButton = new InGamePlayButton(inGameCallback);
            playButton.init(Content);

            buttonList = new LinkedList <SimpleButton>();
            buttonList.AddLast(playButton);
            buttonList.AddLast(soundButton);
            buttonList.AddLast(homeButton);
            buttonList.AddLast(backButton);


            playButton.position.Y = 375f;
            playButton.position.X = 800f;

            soundButton.position.Y = 40f;
            soundButton.position.X = 815f;

            homeButton.position.Y = 175f;
            homeButton.position.X = 815f;

            backButton.position.Y = 255f;
            backButton.position.X = 815f;
        }
Beispiel #2
0
        public void init(Microsoft.Xna.Framework.Content.ContentManager Content, Action inGameCallback, Action backToMenuCallback, Action reinitCallback, Action shopCallback, Action backToPreGameCallback)
        {
            base.init(Content);
            sideMenuBack = Content.Load <Texture2D>(".\\Sprites\\GUI\\backEndGame");


            soundButton = new SoundButton(inGameCallback);
            soundButton.init(Content);

            homeButton = new HomeButton(backToMenuCallback);
            homeButton.init(Content);

            backButton = new ArrowButton(backToPreGameCallback);
            backButton.init(Content);

            playButton = new InGamePlayButton(reinitCallback);
            playButton.init(Content);

            shopButton = new SimpleButton(new ButtonModel(".\\Sprites\\GUI\\shopButton\\shopButton", ".\\Sprites\\GUI\\shopButton\\shopButtonXML", null), "", new Point(), shopCallback);
            shopButton.init(Content);
            shopButton.position.Y = 480;
            shopButton.position.X = 400 - shopButton.texture.Width / 2;
            shopButton.tweener    = new Tweener(shopButton.position.Y, 270f, TimeSpan.FromSeconds(1.0f), Back.EaseOut);
            shopButton.tweener.Start();


            buttonList = new LinkedList <SimpleButton>();
            buttonList.AddLast(soundButton);
            buttonList.AddLast(homeButton);
            buttonList.AddLast(backButton);
            buttonList.AddLast(playButton);
            buttonList.AddLast(shopButton);

            levelScore = new IncrementalLabel(0, ButtonFactory.spriteFont);
            levelScore.init(Content);
            levelScore.fontSize = 1.2f;
            levelScore.mask     = true;

            totalScore = new IncrementalLabel(GameModel.currentPoints, ButtonFactory.spriteFont);
            totalScore.init(Content);
            totalScore.fontSize = 0.8f;

            maxMush = new IncrementalLabel(0, ButtonFactory.spriteFont);
            maxMush.init(Content);
            maxMush.fontSize = 0.6f;
            //maxMush.mask = true;

            maxSpecial = new IncrementalLabel(0, ButtonFactory.spriteFont);
            maxSpecial.init(Content);
            maxSpecial.fontSize = 0.6f;
            // maxSpecial.mask = true;

            maxBoobs = new IncrementalLabel(0, ButtonFactory.spriteFont);
            maxBoobs.init(Content);
            maxBoobs.fontSize = 0.6f;
            //maxBoobs.mask = true;

            maxCombo = new IncrementalLabel(0, ButtonFactory.spriteFont);
            maxCombo.init(Content);
            maxCombo.fontSize = 0.6f;
            //maxCombo.mask = true;

            maxJump = new IncrementalLabel(0, ButtonFactory.spriteFont);
            maxJump.init(Content);
            maxJump.fontSize = 0.6f;
            //maxJump.mask = true;


            soundButton.position.X = 700f;

            homeButton.position.X = 515f;


            playButton.position.X = sideMenuPos.X + sideMenuBack.Width / 2 - playButton.texture.Width / 4;
            playButton.position.Y = -100;

            backButton.position.X = sideMenuPos.X + 10f;

            sideMenuPos.Y          = -480f;
            soundButton.position.Y = -140f;
        }