diff --git a/scripts/stages/1/game_manager.gd b/scripts/stages/1/game_manager.gd index 4e61692..cad6938 100644 --- a/scripts/stages/1/game_manager.gd +++ b/scripts/stages/1/game_manager.gd @@ -105,6 +105,12 @@ func on_enemy_entered_base(enemy): if data['health'] < 1: get_tree().paused = true + + # Clear some components + $CanvasLayer/TowerMenu.hide() + $CanvasLayer/GameStats.hide() + $CanvasLayer/GameDuration.hide() + $CanvasLayer/Defeat.show() $CanvasLayer/Defeat/AudioStreamPlayer.play() diff --git a/scripts/stages/2/game_manager.gd b/scripts/stages/2/game_manager.gd index 181c9b8..16d7ae8 100644 --- a/scripts/stages/2/game_manager.gd +++ b/scripts/stages/2/game_manager.gd @@ -104,6 +104,12 @@ func on_enemy_entered_base(enemy): if data['health'] < 1: get_tree().paused = true + + # Clear some components + $CanvasLayer/TowerMenu.hide() + $CanvasLayer/GameStats.hide() + $CanvasLayer/GameDuration.hide() + $CanvasLayer/Defeat.show() $CanvasLayer/Defeat/AudioStreamPlayer.play() @@ -118,7 +124,7 @@ func _on_duration_timeout(): $CanvasLayer/TowerMenu.hide() $CanvasLayer/GameStats.hide() $CanvasLayer/GameDuration.hide() - + $CanvasLayer/Victory.unlock_next_stage() $CanvasLayer/Victory.show() $CanvasLayer/Victory/AudioStreamPlayer.play() \ No newline at end of file diff --git a/scripts/stages/3/game_manager.gd b/scripts/stages/3/game_manager.gd index 05da798..c5ce368 100644 --- a/scripts/stages/3/game_manager.gd +++ b/scripts/stages/3/game_manager.gd @@ -104,6 +104,12 @@ func on_enemy_entered_base(enemy): if data['health'] < 1: get_tree().paused = true + + # Clear some components + $CanvasLayer/TowerMenu.hide() + $CanvasLayer/GameStats.hide() + $CanvasLayer/GameDuration.hide() + $CanvasLayer/Defeat.show() $CanvasLayer/Defeat/AudioStreamPlayer.play() diff --git a/scripts/stages/4/game_manager.gd b/scripts/stages/4/game_manager.gd index 0281ead..b8dd276 100644 --- a/scripts/stages/4/game_manager.gd +++ b/scripts/stages/4/game_manager.gd @@ -104,6 +104,12 @@ func on_enemy_entered_base(enemy): if data['health'] < 1: get_tree().paused = true + + # Clear some components + $CanvasLayer/TowerMenu.hide() + $CanvasLayer/GameStats.hide() + $CanvasLayer/GameDuration.hide() + $CanvasLayer/Defeat.show() $CanvasLayer/Defeat/AudioStreamPlayer.play() diff --git a/scripts/stages/5/game_manager.gd b/scripts/stages/5/game_manager.gd index 0dc16a2..732d558 100644 --- a/scripts/stages/5/game_manager.gd +++ b/scripts/stages/5/game_manager.gd @@ -104,6 +104,12 @@ func on_enemy_entered_base(enemy): if data['health'] < 1: get_tree().paused = true + + # Clear some components + $CanvasLayer/TowerMenu.hide() + $CanvasLayer/GameStats.hide() + $CanvasLayer/GameDuration.hide() + $CanvasLayer/Defeat.show() $CanvasLayer/Defeat/AudioStreamPlayer.play() diff --git a/scripts/stages/6/game_manager.gd b/scripts/stages/6/game_manager.gd index c3204e2..410e36b 100644 --- a/scripts/stages/6/game_manager.gd +++ b/scripts/stages/6/game_manager.gd @@ -104,6 +104,12 @@ func on_enemy_entered_base(enemy): if data['health'] < 1: get_tree().paused = true + + # Clear some components + $CanvasLayer/TowerMenu.hide() + $CanvasLayer/GameStats.hide() + $CanvasLayer/GameDuration.hide() + $CanvasLayer/Defeat.show() $CanvasLayer/Defeat/AudioStreamPlayer.play()