summaryrefslogtreecommitdiff
path: root/Penguloon/Scenes
diff options
context:
space:
mode:
authoraldrikboy <aldrikboy@gmail.com>2017-12-14 23:35:47 +0100
committeraldrikboy <aldrikboy@gmail.com>2017-12-14 23:35:47 +0100
commita42938d1553565e3d864fa46c04401bbb6f8d13f (patch)
tree24a24a3bd7eb01607c30e176ee0fcaf4e912a277 /Penguloon/Scenes
parent98fb0bdcf3fb02f68f07a72cab211debb827e978 (diff)
New balloons & sounds. Objects can now shoot projectiles.
Diffstat (limited to 'Penguloon/Scenes')
-rw-r--r--Penguloon/Scenes/GameScene.cs11
1 files changed, 7 insertions, 4 deletions
diff --git a/Penguloon/Scenes/GameScene.cs b/Penguloon/Scenes/GameScene.cs
index ac8ea9f..3ab7c28 100644
--- a/Penguloon/Scenes/GameScene.cs
+++ b/Penguloon/Scenes/GameScene.cs
@@ -93,11 +93,14 @@ namespace Penguloon.Scenes
public override void Update(float deltaTime, TouchLocation[] touchLocations)
{
- base.Update(deltaTime, touchLocations);
-
- StartRoundBtn.Update(deltaTime, touchLocations);
+ // We shouldn't update controls when the game is finished to prevent the user from placing any more objects
+ if (!Level.Finished)
+ {
+ base.Update(deltaTime, touchLocations);
+ StartRoundBtn.Update(deltaTime, touchLocations);
+ }
- if (StartRoundBtn.ControlState == ControlState.Disabled && !Level.Map.WaveManager.RoundActive)
+ if (StartRoundBtn.ControlState == ControlState.Disabled && !Level.Map.WaveManager.RoundActive && !Level.Finished)
{
StartRoundBtn.ControlState = ControlState.Idle;
Level.Map.WaveManager.FinishRound();