public override void Initialize() { base.Initialize(); Manager.Scene.AddEntity(new PlayerSignedOut()); // Escena de fondo: Manager.Scene.AddEntity(new GreyInfectiontitleScene()); // Sombreamos el fondo: Manager.Scene.AddEntity(new BackBox()); // Titulo: Label title = new Label(); Manager.Scene.AddEntity(title); title.Caption = Session.Strings["levmenu_title"]; title.Location = new Vector2(Manager.Graphics.ScreenSafeArea.X, Manager.Graphics.ScreenSafeArea.Y + 100); // Rejilla de niveles: GridButtonGroup grid = new GridButtonGroup(); grid.Columns = 8; grid.Rows = 4; grid.ButtonWidth = 136; grid.ButtonHeight = 86; grid.Location = new Vector2(Manager.Graphics.ScreenSafeArea.X + 30, Manager.Graphics.ScreenSafeArea.Y + 200); grid.OnExit += OnExitState; Manager.Scene.AddEntity(grid); LevelSelectionButton button; for (int i = 0; i < 32; i++) { button = new LevelSelectionButton(); button.ConfirmFXWaitToEnd = true; grid.Add(button); button.OnGridEnter += OnEnterLevel; } // Indicaciones de input: InputHintLabel inputHint = new InputHintLabel(); Manager.Scene.AddEntity(inputHint); inputHint.Button = InputHintLabel.GamepadButtonChar.A; inputHint.Caption = Session.Strings["button_select"]; inputHint.Location = new Vector2(340, Manager.Graphics.ScreenSafeArea.Bottom - 42); inputHint = new InputHintLabel(); Manager.Scene.AddEntity(inputHint); inputHint.Button = InputHintLabel.GamepadButtonChar.B; inputHint.Caption = Session.Strings["button_back"]; inputHint.Location = new Vector2(600, Manager.Graphics.ScreenSafeArea.Bottom - 42); inputHint = new InputHintLabel(); Manager.Scene.AddEntity(inputHint); inputHint.Button = InputHintLabel.GamepadButtonChar.LeftThumb; inputHint.Caption = Session.Strings["button_move"]; inputHint.Location = new Vector2(850, Manager.Graphics.ScreenSafeArea.Bottom - 42); }
public override void Initialize() { base.Initialize(); text = new Label(); text.Initialize(); text.Location = new Vector2(160, 380); text.Caption = Session.Strings["endtrial_buttonPurchase"]; button = new InputHintLabel(); button.Initialize(); button.Button = InputHintLabel.GamepadButtonChar.X; button.Caption = Session.Strings["endtrial_unlock"]; button.Location = new Vector2(280, 490); clue = new Clue[2]; string texture = "msc_281x282"; Manager.Graphics.LoadTexture(@"Clues\" + texture); clue[0] = new Clue(); clue[0].Texture = texture; clue[0].Location = new Vector2(100 + 40, 300); texture = "msc_281x282b"; Manager.Graphics.LoadTexture(@"Clues\" + texture); clue[1] = new Clue(); clue[1].Texture = texture; clue[1].Location = new Vector2(290 + 40, 310); timer = new Timer(); }
public override void Initialize() { base.Initialize(); Manager.Scene.AddEntity(new PlayerSignedOut()); MusicPlayer.Play(MusicPlayer.MenuTheme); Manager.Scene.AddEntity(new GreyInfectiontitleScene()); Manager.Scene.AddEntity(new CheckList()); Label title = new Label(); Manager.Scene.AddEntity(title); title.Caption = Session.Strings["endtrial_title"]; title.Location = new Vector2(540, 340); title.ZOrder = -999999; Label text = new Label(); Manager.Scene.AddEntity(text); text.SmallFont = true; text.Caption = Session.Strings["endtrial_text"]; text.Location = new Vector2(540, 390); text.ZOrder = -999999; Thumbnail thumbnail; for (int i = 3; i > -1; i--) { thumbnail = new Thumbnail(); Manager.Scene.AddEntity(thumbnail); thumbnail.Index = i; thumbnail.Location = new Vector2(Manager.Graphics.ScreenSafeArea.Left - (30 * i) + 40, 340 - (30 * i)); } purchase = new InputHintLabel(); Manager.Scene.AddEntity(purchase); purchase.Button = InputHintLabel.GamepadButtonChar.X; purchase.Caption = Session.Strings["endtrial_purchase"]; purchase.Location = new Vector2(Manager.Graphics.ScreenSafeArea.Left + 20, Manager.Graphics.ScreenSafeArea.Bottom - 70); purchase.ZOrder = -999999999; exit = new InputHintLabel(); Manager.Scene.AddEntity(exit); exit.Button = (bool)Manager.Vars["purchaseAndReturnMenu"] ? InputHintLabel.GamepadButtonChar.B : InputHintLabel.GamepadButtonChar.A; exit.Caption = Session.Strings["endtrial_back"]; exit.Location = new Vector2(Manager.Graphics.ScreenSafeArea.Left + 20, Manager.Graphics.ScreenSafeArea.Bottom - 20); exit.ZOrder = -999999999; timer = new Timer(); }
public override void Initialize() { base.Initialize(); Manager.Scene.AddEntity(new PlayerSignedOut()); MusicPlayer.Play(MusicPlayer.LevelTheme); Manager.Graphics.OffSet = new Vector2(Manager.Graphics.ScreenSafeArea.X, Manager.Graphics.ScreenSafeArea.Y); Manager.Graphics.BeginShader(); GreyInfectiontitleScene background = new GreyInfectiontitleScene(); Manager.Scene.AddEntity(background); background.EnableGlitchColor = false; Manager.Scene.AddEntity(new BackBox()); intro1 = new IntroBox(); Manager.Scene.AddEntity(intro1); intro1.Index = 1; intro1.OnEndTypping = OnEndIntro1; intro1.Enabled = true; intro1.Visible = true; intro2 = new IntroBox(); Manager.Scene.AddEntity(intro2); intro2.Index = 2; intro2.OnEndTypping = OnEndIntro2; intro3 = new IntroBox(); Manager.Scene.AddEntity(intro3); intro3.Index = 3; intro3.OnEndTypping = OnEndIntro3; // Pistas: InputHintLabel inputHint = new InputHintLabel(); Manager.Scene.AddEntity(inputHint); inputHint.Button = InputHintLabel.GamepadButtonChar.A; inputHint.Caption = Session.Strings["button_continue"]; inputHint.Location = new Vector2(Manager.Graphics.ScreenBounds.Center.X - 40, Manager.Graphics.ScreenSafeArea.Bottom - 14); inputHint.ZOrder = -9999999; showIntro = false; showGameInput = false; timer = new Timer(); }
public override void Initialize() { base.Initialize(); Manager.Scene.AddEntity(new PlayerSignedOut()); MusicPlayer.Play(MusicPlayer.MenuTheme); Manager.Graphics.OffSet = Vector2.Zero; Manager.Graphics.EndShader(); GreyInfectiontitleScene background = new GreyInfectiontitleScene(); Manager.Scene.AddEntity(background); background.EnableGlitchColor = false; Fog fog = new Fog(); Manager.Scene.AddEntity(fog); fog.ZOrder = -9999998; BackBox black = new BackBox(); Manager.Scene.AddEntity(black); black.ZOrder = -9999997; alert = new ConditionAlert(); Manager.Scene.AddEntity(alert); alert.EndEvent += ExitAlert; // Indicaciones de input: InputHintLabel inputHint = new InputHintLabel(); Manager.Scene.AddEntity(inputHint); inputHint.Button = InputHintLabel.GamepadButtonChar.A; inputHint.Caption = Session.Strings["button_continue"]; inputHint.Location = new Vector2(Manager.Graphics.ScreenSafeArea.Center.X - 64, Manager.Graphics.ScreenSafeArea.Bottom - 14); inputHint.ZOrder = -999999999; }
public override void Initialize() { Manager.Scene.AddEntity(new PlayerSignedOut()); Manager.Vars["CMYK_Ammo"] = 0; Manager.Vars["score"] = 0; MusicPlayer.Play(MusicPlayer.MenuTheme); Manager.Scene.AddEntity(new GreyInfectiontitleScene()); // Opciones del menu: menu = new ButtonGroup(); Manager.Scene.AddEntity(menu); menu.Location = new Vector2(Manager.Graphics.ScreenSafeArea.Right - 240, 360); menu.ButtonHeight = 70; Button button; button = new Button(); button.Caption = Session.Strings["mainmenu_play"]; button.ConfirmFXWaitToEnd = true; button.OnEnter += OnEnterPlay; menu.Add(button); button = new Button(); button.Caption = Session.Strings["mainmenu_options"]; button.ConfirmFXWaitToEnd = true; button.OnEnter += OnEnterOptions; menu.Add(button); button = new Button(); button.Caption = Session.Strings["mainmenu_credits"]; button.ConfirmFXWaitToEnd = true; button.OnEnter += OnEnterCredits; menu.Add(button); button = new Button(); button.Caption = Session.Strings["mainmenu_exit"]; button.OnEnter += OnEnterExit; menu.Add(button); // Si es modo Trial se activa el boton de compra: if (Guide.IsTrialMode) { purchase = new PurchaseButton(); Manager.Scene.AddEntity(purchase); } // Indicaciones de input: InputHintLabel inputHint = new InputHintLabel(); Manager.Scene.AddEntity(inputHint); inputHint.Button = InputHintLabel.GamepadButtonChar.A; inputHint.Caption = Session.Strings["button_select"]; inputHint.Location = new Vector2(475, Manager.Graphics.ScreenSafeArea.Bottom - 14); inputHint = new InputHintLabel(); Manager.Scene.AddEntity(inputHint); inputHint.Button = InputHintLabel.GamepadButtonChar.LeftThumb; inputHint.Caption = Session.Strings["button_move"]; inputHint.Location = new Vector2(750, Manager.Graphics.ScreenSafeArea.Bottom - 14); base.Initialize(); }
public override void Initialize() { base.Initialize(); back = new RectangleOverlay(Manager.Graphics.ScreenBounds); back.BackColor = new Color(0, 0, 0, 0.85f); back.Fixed = true; // Esquema del gamepad de XBox360: gameInput = new Sprite(Manager.Graphics.LoadTexture(@"GameUI\Options\pad_menu")); gameInput.Center = true; gameInput.Location = Helper.PointToVector2(Manager.Graphics.ScreenBounds.Center); gameInput.Fixed = true; // Textos de ayuda: Label label; labels = new List <Label>(); label = new Label(); labels.Add(label); Manager.Scene.AddEntity(label); label.SmallFont = true; label.Caption = Session.Strings["gamepad_pause"]; label.Location = new Vector2(300, 200); label.Center = true; label.ZOrder = -999999908; label = new Label(); labels.Add(label); Manager.Scene.AddEntity(label); label.SmallFont = true; label.Caption = Session.Strings["gamepad_move"]; label.Location = new Vector2(300, 320); label.Center = true; label.ZOrder = -999999908; label = new Label(); labels.Add(label); Manager.Scene.AddEntity(label); label.SmallFont = true; label.Caption = Session.Strings["gamepad_crouch"]; label.Location = new Vector2(300, 516); label.Center = true; label.ZOrder = -999999908; label = new Label(); labels.Add(label); Manager.Scene.AddEntity(label); label.SmallFont = true; label.Caption = Session.Strings["gamepad_weapon"]; label.Location = new Vector2(955, 204); label.Center = true; label.ZOrder = -999999908; label = new Label(); labels.Add(label); Manager.Scene.AddEntity(label); label.SmallFont = true; label.Caption = Session.Strings["gamepad_jump"]; label.Location = new Vector2(955, 320); label.Center = true; label.ZOrder = -999999908; label = new Label(); labels.Add(label); Manager.Scene.AddEntity(label); label.SmallFont = true; label.Caption = Session.Strings["gamepad_shoot"]; label.Location = new Vector2(955, 516); label.Center = true; label.ZOrder = -999999908; // Pistas: inputHint = new InputHintLabel(); Manager.Scene.AddEntity(inputHint); inputHint.Button = InputHintLabel.GamepadButtonChar.B; inputHint.Caption = Session.Strings["button_back"]; inputHint.Location = new Vector2(Manager.Graphics.ScreenBounds.Center.X - 40, Manager.Graphics.ScreenSafeArea.Bottom - 14); inputHint.ZOrder = -999999908; base.ZOrder = -999999907; }
public override void Initialize() { base.Initialize(); Manager.Scene.AddEntity(new PlayerSignedOut()); if ((bool)Manager.Vars["creditsFromEndGame"]) { Manager.Graphics.EndShader(); } else { Manager.Graphics.BeginShader(); } GreyInfectiontitleScene background = new GreyInfectiontitleScene(); Manager.Scene.AddEntity(background); background.EnableGlitchColor = false; credits = Serializers.DeserializeFromTitleStorage <List <CreditsEntry> >("GameData/Credits/" + Session.Culture + ".xml"); Label entry; y = 0; foreach (CreditsEntry c in credits) { entry = new Label(); Manager.Scene.AddEntity(entry); entry.SmallFont = false; entry.Caption = c.Title; entry.Location = new Vector2(Manager.Graphics.ScreenBounds.Center.X, y); entry.Fixed = false; entry.Center = true; entry = new Label(); Manager.Scene.AddEntity(entry); entry.SmallFont = true; entry.Caption = c.Text; entry.Location = new Vector2(Manager.Graphics.ScreenBounds.Center.X - (entry.Bounds.Width / 2), y + 32); entry.Fixed = false; y += 250; } Fog fog = new Fog(); Manager.Scene.AddEntity(fog); fog.ZOrder = -9999998; // Pistas: InputHintLabel inputHint = new InputHintLabel(); Manager.Scene.AddEntity(inputHint); inputHint.Button = (bool)Manager.Vars["creditsFromEndGame"] ? InputHintLabel.GamepadButtonChar.A : InputHintLabel.GamepadButtonChar.B; inputHint.Caption = (bool)Manager.Vars["creditsFromEndGame"] ? Session.Strings["button_continue"] : Session.Strings["button_back"]; inputHint.Location = new Vector2(Manager.Graphics.ScreenBounds.Center.X - 40, Manager.Graphics.ScreenSafeArea.Bottom - 14); inputHint.ZOrder = -9999999; timer = new Timer(); offset = 600; Manager.Graphics.OffSet = new Vector2(0, offset); }
public override void Initialize() { base.Initialize(); Manager.Scene.AddEntity(new PlayerSignedOut()); hasChanges = false; storageRequest = false; Manager.Scene.AddEntity(new GreyInfectiontitleScene()); menu = new ButtonGroup(); Manager.Scene.AddEntity(menu); menu.Location = new Vector2(640, 374); menu.ButtonHeight = 40; menu.OnExit += OnExitState; sliderSound = new SliderButton(); sliderSound.Caption = Session.Strings["optmenu_sound"]; sliderSound.OnChange += OnChangeSoundVolume; menu.Add(sliderSound); sliderMusic = new SliderButton(); sliderMusic.Caption = Session.Strings["optmenu_music"]; sliderMusic.OnChange += OnChangeMusicVolume; menu.Add(sliderMusic); TextButton button; button = new TextButton(); button.Caption = Session.Strings["optmenu_gamepad"]; button.OnEnter += OnEnterControls; menu.Add(button); button = new TextButton(); button.Caption = Session.Strings["optmenu_changestorage"]; button.OnEnter += OnEnterStorage; menu.Add(button); button = new TextButton(); button.Caption = Session.Strings["optmenu_restore"]; button.OnEnter += OnEnterRestore; menu.Add(button); // Indicaciones de input: InputHintLabel inputHint = new InputHintLabel(); Manager.Scene.AddEntity(inputHint); inputHint.Button = InputHintLabel.GamepadButtonChar.A; inputHint.Caption = Session.Strings["button_select"]; inputHint.Location = new Vector2(220, Manager.Graphics.ScreenSafeArea.Bottom - 14); inputHint = new InputHintLabel(); Manager.Scene.AddEntity(inputHint); inputHint.Button = InputHintLabel.GamepadButtonChar.B; inputHint.Caption = Session.Strings["button_back"]; inputHint.Location = new Vector2(475, Manager.Graphics.ScreenSafeArea.Bottom - 14); inputHint = new InputHintLabel(); Manager.Scene.AddEntity(inputHint); inputHint.Button = InputHintLabel.GamepadButtonChar.LeftThumb; inputHint.Caption = Session.Strings["button_move2"]; inputHint.Location = new Vector2(700, Manager.Graphics.ScreenSafeArea.Bottom - 14); // Sonidos de muestra para evaluar volumen de los efectos: sounds = new List <SoundPlayer>(); string assetName; foreach (string file in System.IO.Directory.GetFiles(Manager.Content.RootDirectory + @"\Audio\FX\", "*.*")) { assetName = file.Replace(".xnb", "").Replace(Manager.Content.RootDirectory + @"\", ""); sounds.Add(new SoundPlayer(assetName)); } SetParams(); }