protected override void Initialize() { base.Initialize(); enterTransitionDuration = 100; exitTransitionDuration = 300; BgColor = new Color(175, 78, 78); char separator = Path.AltDirectorySeparatorChar; credits = new Scalable2DGameObject(goManager.R2D); credits.AdaptToFrame = true; credits.BaseFileName = "credits"; credits.FilePath = "Imagem" + separator + "ui" + separator; scrollSpeed = 1; goManager.AddObject(credits); }
protected override void Initialize() { base.Initialize(); FreezeUpdatesBelow = true; FreezeGraphicsBelow = false; char separator = Path.AltDirectorySeparatorChar; clock = new Scalable2DGameObject(goManager.R2D); clock.AdaptToFrame = true; clock.BaseFileName = "clock"; clock.FilePath = "Imagem" + separator + "ui" + separator + "bate_bola" + separator + "espera" + separator; number = new Animated2DGameObject(goManager.R2D, clock.FilePath, "num", 3, -1); number.AdaptToFrame = true; goManager.AddObject(clock); goManager.AddObject(number); }
protected override void Initialize() { base.Initialize(); enterTransitionDuration = 500; exitTransitionDuration = 100; goToState = StatesIdList.EMPTY_STATE; Rectangle screen = parent.GraphicsDevice.Viewport.Bounds; char separator = Path.AltDirectorySeparatorChar; string basePath = "Menu" + separator + "Char_Selection" + separator; bg = new Scalable2DGameObject(goManager.R2D); bg.Width = screen.Width; bg.Height = screen.Height; bg.FilePath = basePath; bg.BaseFileName = "char_select_bg"; difficultyLbl = new TextBox(goManager.R2D); difficultyLbl.Width = 300; difficultyLbl.Height = 40; difficultyLbl.X = 5; difficultyLbl.Y = 5; difficultyLbl.FontSize = 40; difficultyLbl.TextColor = Color.Beige; difficultyLbl.ShadowColor = Color.Beige * 0.5f; difficultyLbl.DropShadow = true; difficultyLbl.ShadowOffset = new Vector2(-4, -4); difficultyLbl.Text = "DIFICULDADE:"; Rectangle bounds = new Rectangle((int)(difficultyLbl.Y + difficultyLbl.Height + 10), (int)(difficultyLbl.Y + difficultyLbl.Height), 163, 76); easy = new ToggleButton(goManager.R2D, bounds); easy.UseText = false; easy.BaseFileName = "easyBtn"; easy.FilePath = basePath + "difficulty" + separator; easy.mouseClicked += new Button.MouseClicked(difficultyBtn_mouseClicked); easy.LockToggleState = true; bounds.X += bounds.Width + 20; medium = new ToggleButton(goManager.R2D, bounds); medium.UseText = false; medium.BaseFileName = "mediumBtn"; medium.FilePath = easy.FilePath; medium.mouseClicked += new Button.MouseClicked(difficultyBtn_mouseClicked); medium.LockToggleState = true; bounds.X += bounds.Width + 20; hard = new ToggleButton(goManager.R2D, bounds); hard.UseText = false; hard.BaseFileName = "hardBtn"; hard.FilePath = easy.FilePath; hard.mouseClicked += new Button.MouseClicked(difficultyBtn_mouseClicked); hard.LockToggleState = true; subjectLbl = new TextBox(goManager.R2D); subjectLbl.Width = 180; subjectLbl.Height = 30; subjectLbl.X = 5; subjectLbl.Y = easy.Y + easy.Height + 40; subjectLbl.FontSize = 40; subjectLbl.TextColor = Color.Beige; subjectLbl.ShadowColor = Color.Beige * 0.5f; subjectLbl.DropShadow = true; subjectLbl.ShadowOffset = new Vector2(-4, -4); subjectLbl.Text = "MATÉRIA:"; bounds.X = 50; bounds.Y = (int)(subjectLbl.Y + subjectLbl.Height + 10); math = new ToggleButton(goManager.R2D, bounds); math.UseText = false; math.BaseFileName = "mathBtn"; math.FilePath = basePath + "subjects" + separator; math.mouseClicked += new Button.MouseClicked(subjectBtn_mouseClicked); math.LockToggleState = true; bounds.X += bounds.Width + 20; pt = new ToggleButton(goManager.R2D, bounds); pt.UseText = false; pt.BaseFileName = "ptBtn"; pt.FilePath = basePath + "subjects" + separator; pt.mouseClicked += new Button.MouseClicked(subjectBtn_mouseClicked); pt.LockToggleState = true; bounds.X += bounds.Width + 20; both = new ToggleButton(goManager.R2D, bounds); both.UseText = false; both.BaseFileName = "ptMathBtn"; both.FilePath = basePath + "subjects" + separator; both.mouseClicked += new Button.MouseClicked(subjectBtn_mouseClicked); both.LockToggleState = true; characterLbl = new TextBox(goManager.R2D); characterLbl.Width = 400; characterLbl.Height = 30; characterLbl.X = 5; characterLbl.Y = math.Y + math.Height + 40; characterLbl.FontSize = 40; characterLbl.TextColor = Color.Beige; characterLbl.ShadowColor = Color.Beige * 0.5f; characterLbl.DropShadow = true; characterLbl.ShadowOffset = new Vector2(-4, -4); characterLbl.Text = "ESCALE SEU ATACANTE:"; bounds = new Rectangle(screen.Width / 2 - 250, (int)(characterLbl.Y + characterLbl.Height + 10), 200, 250); cosme = new AnimatedButton(goManager.R2D, bounds, new int[] { 1, 1, 1, 1 }, new bool[] { false, false, false, false }); cosme.UseText = false; cosme.BaseFileName = "cosmeBtn"; cosme.FilePath = basePath; cosme.mouseClicked += new Button.MouseClicked(cosme_mouseClicked); cosme.LockToggleState = true; bounds = new Rectangle(screen.Width / 2 + 50, screen.Height / 2 - 25, 200, 250); maria = new AnimatedButton(goManager.R2D, bounds, new int[] { 1, 1, 1, 1 }, new bool[] { false, false, false, false }); maria.UseText = false; maria.BaseFileName = "mariaBtn"; maria.FilePath = cosme.FilePath; maria.mouseClicked += new Button.MouseClicked(maria_mouseClicked); maria.LockToggleState = true; bounds = new Rectangle(screen.Width / 2 - 235, (int)maria.Bounds.Y + (int)maria.Bounds.Height + 50, 210, 70); titleScreen = new Button(goManager.R2D, bounds); titleScreen.BaseFileName = "menuInicialBtn"; titleScreen.FilePath = "Menu" + separator + "Generic" + separator; titleScreen.UseText = false; titleScreen.mouseClicked += new Button.MouseClicked(titleScreen_mouseClicked); bounds = new Rectangle(screen.Width / 2 + 25, (int)titleScreen.Bounds.Y, 210, 70); play = new Button(goManager.R2D, bounds); play.BaseFileName = "playBtn"; play.FilePath = "Menu" + separator + "Char_Selection" + separator; play.mouseClicked += new Button.MouseClicked(play_mouseClicked); goManager.AddObject(bg); goManager.AddObject(difficultyLbl); goManager.AddObject(easy); goManager.AddObject(medium); goManager.AddObject(hard); goManager.AddObject(subjectLbl); goManager.AddObject(math); goManager.AddObject(pt); goManager.AddObject(both); goManager.AddObject(characterLbl); goManager.AddObject(cosme); goManager.AddObject(maria); goManager.AddObject(titleScreen); goManager.AddObject(play); DisableButtons(); }