summaryrefslogtreecommitdiff
path: root/Penguloon/Scenes/GameScene.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Penguloon/Scenes/GameScene.cs')
-rw-r--r--Penguloon/Scenes/GameScene.cs42
1 files changed, 35 insertions, 7 deletions
diff --git a/Penguloon/Scenes/GameScene.cs b/Penguloon/Scenes/GameScene.cs
index 14c2d96..ac8ea9f 100644
--- a/Penguloon/Scenes/GameScene.cs
+++ b/Penguloon/Scenes/GameScene.cs
@@ -18,8 +18,8 @@ namespace Penguloon.Scenes
this.Level.Initialize(this);
StartRoundBtn = new Button(this,
- new Vector2(Level.Map.MapWidth + StaticUIValues.BorderWidth, StaticUIValues.ScreenViewport.Y - 120),
- new Vector2(StaticUIValues.ScreenViewport.X - (Level.Map.MapWidth + StaticUIValues.BorderWidth), 120), "Start");
+ new Vector2(Level.Map.MapWidth + StaticUIValues.BorderWidth, StaticUIValues.ScreenViewport.Y - StaticUIValues.IngameUIPlayButtonHeight),
+ new Vector2(StaticUIValues.ScreenViewport.X - (Level.Map.MapWidth + StaticUIValues.BorderWidth), StaticUIValues.IngameUIPlayButtonHeight), "Start");
StartRoundBtn.OnClick += StartRoundBtn_OnClick;
}
@@ -44,23 +44,51 @@ namespace Penguloon.Scenes
base.Draw(deltaTime);
- StartRoundBtn.Draw(deltaTime);
-
this.Level.Draw(deltaTime);
DrawUI(deltaTime);
+
+ StartRoundBtn.Draw(deltaTime);
}
private void DrawUI(float deltaTime)
{
+ //background
+ Main.SpriteBatch.Draw(ContentManager.GetTexture("UI/red"),
+ destinationRectangle: new Rectangle(Level.Map.MapWidth + StaticUIValues.BorderWidth,
+ 0, StaticUIValues.IngameUIWidth, (int)StaticUIValues.ScreenViewport.Y));
+
+ //border
Main.SpriteBatch.Draw(ContentManager.GetTexture("UI/border"),
destinationRectangle: new Rectangle(Level.Map.MapWidth,
0, StaticUIValues.BorderWidth, (int)StaticUIValues.ScreenViewport.Y));
- DrawText(ContentManager.GetFont(StaticUIValues.IngameFont), "Wave: " + Level.Map.WaveManager.CurrentWave.ToString(),
- new Vector2(StaticUIValues.ScreenViewport.X - StaticUIValues.IngameUIWidth, 10),
- new Vector2(StaticUIValues.IngameUIWidth, 200),
+
+ //border under text
+ Main.SpriteBatch.Draw(ContentManager.GetTexture("UI/border-horizontal"),
+ destinationRectangle: new Rectangle(Level.Map.MapWidth + StaticUIValues.BorderWidth - 4,
+ StaticUIValues.IngameUITextAreaHeight, StaticUIValues.IngameUIWidth, StaticUIValues.BorderWidth));
+
+ //border above button
+ Main.SpriteBatch.Draw(ContentManager.GetTexture("UI/border-horizontal"),
+ destinationRectangle: new Rectangle(Level.Map.MapWidth + StaticUIValues.BorderWidth - 4,
+ (int)StaticUIValues.ScreenViewport.Y - StaticUIValues.IngameUIPlayButtonHeight - StaticUIValues.BorderWidth,
+ StaticUIValues.IngameUIWidth, StaticUIValues.BorderWidth));
+
+ DrawText(ContentManager.GetFont(StaticUIValues.IngameFont), "Gold: " + Level.Money,
+ new Vector2(Level.Map.MapWidth + StaticUIValues.BorderWidth, 10),
+ new Vector2(StaticUIValues.ScreenViewport.X - Level.Map.MapWidth - StaticUIValues.BorderWidth, StaticUIValues.IngameUITextAreaHeight),
TextAllignment.CenterTop, Color.White, Color.Black, 2);
+
+ DrawText(ContentManager.GetFont(StaticUIValues.IngameFont), "Wave: " + Level.Map.WaveManager.CurrentWave.ToString(),
+ new Vector2(Level.Map.MapWidth + StaticUIValues.BorderWidth, 0),
+ new Vector2(StaticUIValues.ScreenViewport.X - Level.Map.MapWidth - StaticUIValues.BorderWidth, StaticUIValues.IngameUITextAreaHeight),
+ TextAllignment.CenterMiddle, Color.White, Color.Black, 2);
+
+ DrawText(ContentManager.GetFont(StaticUIValues.IngameFont), "Health: " + Level.Health,
+ new Vector2(Level.Map.MapWidth + StaticUIValues.BorderWidth, 0),
+ new Vector2(StaticUIValues.ScreenViewport.X - Level.Map.MapWidth - StaticUIValues.BorderWidth, StaticUIValues.IngameUITextAreaHeight),
+ TextAllignment.CenterBottom, Color.White, Color.Black, 2);
}
public override void Update(float deltaTime, TouchLocation[] touchLocations)