Ejemplo n.º 1
0
        public BaseHUD()
            : base(".\\Sprites\\GUI\\shopScreen\\starContainer")
        {
            mushroomsLabel            = new IncrementalLabel(0, ButtonFactory.spriteFont);
            mushroomsLabel.position.X = 70;
            mushroomsLabel.position.Y = 448;

            comboLabel            = new IncrementalLabel(0);
            comboLabel.position.X = 380;
            comboLabel.position.Y = 448;

            timeLabel            = new IncrementalLabel(0);
            timeLabel.position.X = 220;
            timeLabel.position.Y = 448;
        }
Ejemplo n.º 2
0
        public override void build()
        {
            base.build();

            outt = false;

            wearPage = new WearPage();
            addChild(wearPage);
            wearPage.init(content);


            itemPage = new ItemPage();
            addChild(itemPage);
            itemPage.init(content);

            levelPage = new LevelPage();
            addChild(levelPage);
            levelPage.init(content);

            pages = new LinkedList <DefaultPage>();
            pages.AddLast(wearPage);
            pages.AddLast(itemPage);
            pages.AddLast(levelPage);

            currentPage = wearPage;
            currentPage.show();

            ButtonModel defaultButtonModel = new ButtonModel(".\\Sprites\\GUI\\defaultButton\\shapeButton", ".\\Sprites\\GUI\\defaultButton\\shapeButtonXML", ButtonFactory.spriteFont);

            backButton = new HomeButton(gotoInit);
            backButton.init(content);
            backButton.position.Y = 20;
            backButton.position.X = -backButton.texture.Width - 5;
            backButton.tweener    = new Tweener(-backButton.texture.Width - 5, 20f, TimeSpan.FromSeconds(.5f), Back.EaseOut);
            backButton.tweener.Start();

            wearButton = new SimpleButton(defaultButtonModel, "WEAR", new Point(205, 56), setWearPage);
            wearButton.init(content);
            wearButton.fontScale = .9f;
            // wearButton.fontColor = new Color(63, 53, 127);
            wearButton.fontMargin = new Vector2(55, 6);
            wearButton.position.Y = 85;
            wearButton.position.X = -wearButton.texture.Width - 5;
            wearButton.tweener    = new Tweener(-wearButton.texture.Width - 5, 15f, TimeSpan.FromSeconds(.7f), Back.EaseOut);
            wearButton.tweener.Start();
            wearButton.isActive = true;

            // itemButton = new SimpleButton(new ButtonModel(".\\Sprites\\GUI\\defaultButton\\itemsButton", "", null), "", new Point(), setItemPage);
            itemButton = new SimpleButton(defaultButtonModel, "ITEM", new Point(205, 56), setItemPage);
            itemButton.init(content);
            itemButton.fontScale = .9f;
            //itemButton.fontColor = new Color(63,53,127);
            itemButton.fontMargin = new Vector2(62, 6);
            itemButton.position.Y = 150;
            itemButton.position.X = -itemButton.texture.Width - 5;
            itemButton.tweener    = new Tweener(-itemButton.texture.Width - 5, 15f, TimeSpan.FromSeconds(.8f), Back.EaseOut);
            itemButton.tweener.Start();

            levelButton = new SimpleButton(defaultButtonModel, "LEVELS", new Point(205, 56), setLevelPage);
            levelButton.init(content);
            levelButton.fontScale = .9f;
            //levelButton.fontColor = new Color(63, 53, 127);
            levelButton.fontMargin = new Vector2(50, 6);
            levelButton.position.Y = 215;
            levelButton.position.X = -levelButton.texture.Width - 5;
            levelButton.tweener    = new Tweener(-levelButton.texture.Width - 5, 15f, TimeSpan.FromSeconds(.9f), Back.EaseOut);
            levelButton.tweener.Start();

            coins = new StaticObject(".\\Sprites\\GUI\\shopScreen\\starContainer");
            coins.init(content);
            coins.position.Y = 405;
            coins.position.X = levelButton.position.X - 10;

            starsLabel = new IncrementalLabel(0, ButtonFactory.spriteFont);
            starsLabel.init(content);
            starsLabel.newValue(GameModel.currentPoints);
            starsLabel.position.Y = 415;
            starsLabel.position.X = coins.position.X + 60;

            addChild(wearButton);

            addChild(itemButton);
            addChild(levelButton);
            addChild(backButton);
            addChild(coins);
            addChild(starsLabel);
        }
Ejemplo n.º 3
0
        public override void build()
        {
            base.build();
            background = new StaticObject(".\\Sprites\\rufusConcept");
            background.init(content);
            addChild(background);

            outt = false;

            ButtonModel playModel = new ButtonModel(".\\Sprites\\GUI\\playButtonNew\\playButtonNew", ".\\Sprites\\GUI\\playButtonNew\\playButtonNewXML", null);


            soundButton = new SoundButton(null);
            soundButton.init(content);
            soundButton.position.X = 700f;
            soundButton.position.Y = 40f;

            infoButton = new InfoButton(Game1.showDevCard);
            infoButton.init(content);
            infoButton.position.X = 40f;
            infoButton.position.Y = 40f;

            playButton            = new SimpleButton(playModel, "", new Point(), gotoGame);
            playButton.fontMargin = new Vector2(55, 15);
            playButton.fontScale  = 1;
            playButton.init(content);
            playButton.position.Y = 480;
            playButton.position.X = 500;
            playButton.tweener    = new Tweener(playButton.position.Y, 350f, TimeSpan.FromSeconds(1.0f), Back.EaseOut);
            playButton.tweener.Start();

            ButtonModel shopModel = new ButtonModel(".\\Sprites\\GUI\\shopButton\\shopButton", ".\\Sprites\\GUI\\shopButton\\shopButtonXML", null);

            shopButton            = new SimpleButton(shopModel, "", new Point(), gotoShop);
            shopButton.fontMargin = new Vector2(55, 15);
            shopButton.fontScale  = 1;
            shopButton.init(content);
            shopButton.position.Y = 480;
            shopButton.position.X = 148;
            shopButton.tweener    = new Tweener(shopButton.position.Y, 350f, TimeSpan.FromSeconds(1.0f), Back.EaseOut);
            shopButton.tweener.Start();

            statisticsButton = new StatisticsButton(openStatistic);
            statisticsButton.init(content);
            statisticsButton.position.Y = 480;
            statisticsButton.position.X = 40;
            statisticsButton.tweener    = new Tweener(statisticsButton.position.Y, 350f, TimeSpan.FromSeconds(1.0f), Back.EaseOut);
            statisticsButton.tweener.Start();

            ButtonModel logoModel = new ButtonModel(".\\Sprites\\GUI\\rufusLogo", "", null);

            logoButton = new SimpleButton(logoModel, "", new Point(), null);
            logoButton.init(content);
            logoButton.position.Y = -100;
            logoButton.position.X = 140;
            logoButton.tweener    = new Tweener(logoButton.position.Y, 20f, TimeSpan.FromSeconds(1.0f), Back.EaseOut);
            logoButton.tweener.Start();

            starsLabel = new IncrementalLabel(0, ButtonFactory.spriteFont);
            starsLabel.init(content);
            starsLabel.newValue(GameModel.currentPoints);
            starsLabel.position.Y = shopButton.position.Y + 25;
            starsLabel.position.X = shopButton.position.X + 72;
            starsLabel.fontSize   = 0.8f;

            addChild(playButton);
            addChild(shopButton);
            addChild(statisticsButton);
            addChild(logoButton);
            addChild(starsLabel);
            addChild(soundButton);
            addChild(infoButton);
        }
Ejemplo n.º 4
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;
        }