public override void init(ContentManager Content) { content = Content; base.init(Content); backShape.init(content); isActive = false; position.X = 800 / 2 - texture.Width / 2; position.Y = -texture.Height; mainImage = new StaticObject(GameModel.rufusModels.ElementAt(0).largePath); mainImage.init(content); backButton = new ArrowButton(hide); backButton.init(Content); isActive = false; }
public override void init(ContentManager Content) { content = Content; base.init(Content); backShape.init(content); isActive = false; position.X = 800 / 2 - texture.Width / 2; position.Y = -texture.Height; mainImage = new StaticObject(GameModel.rufusModels.ElementAt(0).largePath); mainImage.init(content); star.init(content); firstSymbol.init(content); secSymbol.init(content); thrSymbol.init(content); backButton = new ArrowButton(hide); backButton.init(Content); ButtonModel defaultButtonModel = new ButtonModel(".\\Sprites\\GUI\\defaultButton\\shapeButton", ".\\Sprites\\GUI\\defaultButton\\shapeButtonXML", ButtonFactory.spriteFont); buyButton = new SimpleButton(defaultButtonModel, "BUY", new Point(186, 48), buyItem); buyButton.init(content); buyButton.fontScale = .9f; buyButton.fontMargin = new Vector2(60, 2); cardImages.AddLast(mainImage); cardImages.AddLast(backButton); cardImages.AddLast(buyButton); cardImages.AddLast(firstSymbol); cardImages.AddLast(secSymbol); cardImages.AddLast(thrSymbol); cardImages.AddLast(star); isActive = false; }
public override void init(ContentManager Content) { content = Content; base.init(Content); backShape.init(content); twButton.init(content); fbButton.init(content); isActive = false; position.X = 800 / 2 - texture.Width / 2; position.Y = -texture.Height; mainImage = new StaticObject(GameModel.rufusModels.ElementAt(0).largePath); mainImage.init(content); backButton = new ArrowButton(hide); backButton.init(Content); ButtonModel defaultButtonModel = new ButtonModel(".\\Sprites\\GUI\\defaultButton\\shapeButton", ".\\Sprites\\GUI\\defaultButton\\shapeButtonXML", ButtonFactory.spriteFont); isActive = false; }
public override void init(ContentManager Content) { content = Content; base.init(Content); backShape.init(content); isActive = false; position.X = 800 / 2 - texture.Width / 2; position.Y = -texture.Height; backButton = new ArrowButton(hide); backButton.init(Content); cheatButton = new ArrowButton(cheat); cheatButton.init(Content); cheatButton.position.X = 750; cheatButton.position.Y = 430; ButtonModel defaultButtonModel = new ButtonModel(".\\Sprites\\GUI\\defaultButton\\shapeButton", ".\\Sprites\\GUI\\defaultButton\\shapeButtonXML", ButtonFactory.spriteFont); cheatCounter = 0; isActive = false; }
public override void build() { base.build(); loadScreen.init(content); //SALVAR O CENARIO ATUAL RufusModel temp = GameModel.levelsModels.ElementAt(GameModel.currentLevelID); LevelBehaviour temp2 = (LevelBehaviour)(temp.behaviour); currentLevelModel = temp2.levelModel; background = new BackLevelView(currentLevelModel.bgPath); if (currentLevelModel.clouds != null) { background.addClouds(currentLevelModel.clouds); } background.setColor(currentLevelModel.color); background.init(content); addChild(background); background.start(); outt = false; ButtonModel playModel = new ButtonModel(".\\Sprites\\GUI\\readyButton\\readyButton", ".\\Sprites\\GUI\\readyButton\\readyButtonXML", null); playButton = new SimpleButton(playModel, "", new Point(), gotoGame); playButton.init(content); playButton.position.Y = 570; playButton.position.X = 400 - playButton.texture.Width / 2; playButton.tweener = new Tweener(playButton.position.Y, 350f, TimeSpan.FromSeconds(1.0f), Back.EaseOut); playButton.tweener.Start(); locationButton = new SimpleButton(new ButtonModel(".\\Sprites\\GUI\\locationButton\\locationButton", ".\\Sprites\\GUI\\locationButton\\locationButtonXML", null), "", new Point(), changeLevelModel); locationButton.init(content); locationButton.position.Y = 480; locationButton.position.X = 400 - locationButton.texture.Width / 2; locationButton.tweener = new Tweener(locationButton.position.Y, 260f, TimeSpan.FromSeconds(1.0f), Back.EaseOut); locationButton.tweener.Start(); backButton = new HomeButton(gotoInit); backButton.init(content); backButton.position.Y = 40; backButton.position.X = 40; // backButton.tweener = new Tweener(backButton.position.Y, 40f, TimeSpan.FromSeconds(1.0f), Back.EaseOut); // backButton.tweener.Start(); changeLevel = new ArrowButton(changeRufus); changeLevel.init(content); changeLevel.position.Y = -40; changeLevel.position.X = 490; changeLevel.spriteEffects = SpriteEffects.FlipHorizontally; changeLevel.scale = new Vector2(.8f); changeLevel.tweener = new Tweener(changeLevel.position.Y, 120f, TimeSpan.FromSeconds(1.0f), Cubic.EaseOut); changeLevel.tweener.Start(); changeLevelBack = new ArrowButton(changeRufusBack); changeLevelBack.init(content); changeLevelBack.position.Y = -40; changeLevelBack.position.X = 268; changeLevelBack.spriteEffects = SpriteEffects.None; changeLevelBack.scale = new Vector2(.8f); changeLevelBack.tweener = new Tweener(changeLevel.position.Y, 120f, TimeSpan.FromSeconds(1.0f), Cubic.EaseOut); changeLevelBack.tweener.Start(); backRufusBox = new SimpleButton(new ButtonModel(".\\Sprites\\GUI\\backChoiceRufus", "", null), "", new Point(), openCard); backRufusBox.init(content); backRufusBox.position.Y = -backRufusBox.texture.Height; backRufusBox.position.X = 400 - backRufusBox.texture.Width / 2; backRufusBox.tweener = new Tweener(backRufusBox.position.Y, 40f, TimeSpan.FromSeconds(1.0f), Cubic.EaseOut); backRufusBox.tweener.Start(); rufusImage = new StaticObject(GameModel.rufusModels.ElementAt(GameModel.currentRufusID).largePath); rufusImage.init(content); rufusImage.position.Y = backRufusBox.position.Y + rufusImage.texture.Height / 2 + backRufusBox.texture.Height / 2; rufusImage.position.X = 400 - rufusImage.texture.Width / 2; soundButton = new SoundButton(null); soundButton.init(content); soundButton.position.X = 700f; soundButton.position.Y = 40f; helpButton = new HelpButton(null); helpButton.init(content); helpButton.position.X = 600f; helpButton.position.Y = 40f; addChild(backRufusBox); addChild(playButton); addChild(changeLevel); addChild(changeLevelBack); addChild(locationButton); addChild(backButton); addChild(rufusImage); addChild(soundButton); addChild(helpButton); }
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; }