Clear some components after defeat
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Moe Poi ~ 2023-10-25 17:50:03 +07:00
parent dd3ed03212
commit f86d6295d5
6 changed files with 37 additions and 1 deletions

View file

@ -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()

View file

@ -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()

View file

@ -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()

View file

@ -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()

View file

@ -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()

View file

@ -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()