diff options
| author | aldrikboy <aldrikboy@gmail.com> | 2017-12-14 23:35:47 +0100 |
|---|---|---|
| committer | aldrikboy <aldrikboy@gmail.com> | 2017-12-14 23:35:47 +0100 |
| commit | a42938d1553565e3d864fa46c04401bbb6f8d13f (patch) | |
| tree | 24a24a3bd7eb01607c30e176ee0fcaf4e912a277 /Penguloon/Scenes/GameScene.cs | |
| parent | 98fb0bdcf3fb02f68f07a72cab211debb827e978 (diff) | |
New balloons & sounds. Objects can now shoot projectiles.
Diffstat (limited to 'Penguloon/Scenes/GameScene.cs')
| -rw-r--r-- | Penguloon/Scenes/GameScene.cs | 11 |
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(); |
