From af0ba50d00722e1b7330d1f9b1d23bd3b07a5567 Mon Sep 17 00:00:00 2001 From: aldrikboy Date: Wed, 17 Jan 2018 14:26:43 +0100 Subject: upgrades --- Penguloon/Controls/IngameOptions.cs | 13 ++++++++++++- Penguloon/Controls/LevelSelector.cs | 1 + Penguloon/Controls/MuteButton.cs | 8 ++------ Penguloon/Controls/ObjectSelector.cs | 6 +++--- 4 files changed, 18 insertions(+), 10 deletions(-) (limited to 'Penguloon/Controls') diff --git a/Penguloon/Controls/IngameOptions.cs b/Penguloon/Controls/IngameOptions.cs index e5a6890..137094c 100644 --- a/Penguloon/Controls/IngameOptions.cs +++ b/Penguloon/Controls/IngameOptions.cs @@ -23,6 +23,8 @@ namespace Penguloon.Controls public MessageBox QuitConfirmationBox { get; set; } public DateTime ShowTimeMsgBox { get; set; } + public MuteButton BtnMute { get; set; } + public IngameOptions(SceneBase parentScene, Vector2 position, Vector2 size) : base(parentScene, position, size) { this.DrawText = false; @@ -33,6 +35,10 @@ namespace Penguloon.Controls Vector2 BtnSize = new Vector2(Size.X - 90, StaticUIValues.IngameUIPlayButtonHeight); Vector2 MsgBoxSize = new Vector2(900, 550); + BtnMute = new MuteButton(parentScene, + new Vector2(position.X + (Size.X / 2) - (BtnSize.X / 2), Position.Y + Size.Y - (50 * 2) - (BtnSize.Y * 2)), + new Vector2(StaticUIValues.MenuButtonSize.Y, StaticUIValues.MenuButtonSize.Y)); + BtnContinue = new Button(parentScene, new Vector2(position.X + (Size.X / 2) - (BtnSize.X / 2), Position.Y + 50), BtnSize, parentScene.Main.Resources.GetString(Resource.String.IngameOptionsContinue)); @@ -58,7 +64,10 @@ namespace Penguloon.Controls GameScene gameScene = (GameScene)ParentScene; gameScene.Level.FinishGame(); - SceneManager.SelectedScene = SelectedScene.Menu; + gameScene.Level.EndDate = DateTime.Now; + gameScene.IngameEndStats.State = IngameOptionsState.Show; + + //SceneManager.SelectedScene = SelectedScene.Menu; } private void QuitConfirmationBox_OnMissClick(object sender, EventArgs e) @@ -93,6 +102,7 @@ namespace Penguloon.Controls BtnContinue.Draw(deltaTime); BtnQuit.Draw(deltaTime); QuitConfirmationBox.Draw(deltaTime); + BtnMute.Draw(deltaTime); } public override void Update(float deltaTime, TouchLocation[] touchLocations) @@ -109,6 +119,7 @@ namespace Penguloon.Controls BtnContinue.Update(deltaTime, touchLocations); BtnQuit.Update(deltaTime, touchLocations); + BtnMute.Update(deltaTime, touchLocations); } } } \ No newline at end of file diff --git a/Penguloon/Controls/LevelSelector.cs b/Penguloon/Controls/LevelSelector.cs index de3b080..b5f0b26 100644 --- a/Penguloon/Controls/LevelSelector.cs +++ b/Penguloon/Controls/LevelSelector.cs @@ -107,6 +107,7 @@ namespace Penguloon.Controls Levels.Add(new IceLevel3()); Levels.Add(new SandLevel1()); + Levels.Add(new SandLevel2()); } public override void Draw(float deltaTime) diff --git a/Penguloon/Controls/MuteButton.cs b/Penguloon/Controls/MuteButton.cs index fdd1d91..a8d415d 100644 --- a/Penguloon/Controls/MuteButton.cs +++ b/Penguloon/Controls/MuteButton.cs @@ -5,8 +5,6 @@ namespace Penguloon.Controls { public class MuteButton : ControlBase { - public bool Muted { get; set; } = false; - public MuteButton(SceneBase parentScene, Vector2 position, Vector2 size) : base(parentScene, position, size) { this.BackgroundIdle = ContentManager.GetTexture("UI/BtnMuteIdle"); @@ -23,11 +21,9 @@ namespace Penguloon.Controls private void Button_OnClick(object sender, ClickArgs e) { - Muted = !Muted; - - SoundManager.Muted = Muted; + SoundManager.Muted = !SoundManager.Muted; - if (Muted) + if (SoundManager.Muted) { this.BackgroundIdle = ContentManager.GetTexture("UI/BtnUnmuteIdle"); this.BackgroundPressed = ContentManager.GetTexture("UI/BtnUnmutePressed"); diff --git a/Penguloon/Controls/ObjectSelector.cs b/Penguloon/Controls/ObjectSelector.cs index fd444c8..b2ae221 100644 --- a/Penguloon/Controls/ObjectSelector.cs +++ b/Penguloon/Controls/ObjectSelector.cs @@ -126,11 +126,11 @@ namespace Penguloon.Controls private void LoadObjects() { Objects.Add(new Tuple(new PenguinObject(Map), 250)); - Objects.Add(new Tuple(new GoldPenguinObject(Map), 360)); + Objects.Add(new Tuple(new GoldPenguinObject(Map), 420)); Objects.Add(new Tuple(new CannonObject(Map), 650)); Objects.Add(new Tuple(new HealthGeneratorObject(Map), 800)); - Objects.Add(new Tuple(new MortarObject(Map), 1200)); - Objects.Add(new Tuple(new KingPenguinObject(Map), 2550)); + Objects.Add(new Tuple(new MortarObject(Map), 1750)); + Objects.Add(new Tuple(new KingPenguinObject(Map), 3550)); } public override void Update(float deltaTime, TouchLocation[] touchLocations) -- cgit v1.2.3-70-g09d2