Show defeat scene if current health less than 1
This commit is contained in:
parent
4906768091
commit
9465faaf66
6 changed files with 6 additions and 6 deletions
|
@ -87,7 +87,7 @@ func on_enemy_entered_base(enemy):
|
|||
$CanvasLayer/GameStats.set_damage(enemy.damage)
|
||||
|
||||
if data['health'] < 1:
|
||||
print("Game Over")
|
||||
get_tree().change_scene_to_file("res://scenes/ui/defeat.tscn")
|
||||
|
||||
func on_enemy_reward(value: int):
|
||||
data['resource'] += value
|
||||
|
|
|
@ -86,7 +86,7 @@ func on_enemy_entered_base(enemy):
|
|||
$CanvasLayer/GameStats.set_damage(enemy.damage)
|
||||
|
||||
if data['health'] < 1:
|
||||
print("Game Over")
|
||||
get_tree().change_scene_to_file("res://scenes/ui/defeat.tscn")
|
||||
|
||||
func on_enemy_reward(value: int):
|
||||
data['resource'] += value
|
||||
|
|
|
@ -86,7 +86,7 @@ func on_enemy_entered_base(enemy):
|
|||
$CanvasLayer/GameStats.set_damage(enemy.damage)
|
||||
|
||||
if data['health'] < 1:
|
||||
print("Game Over")
|
||||
get_tree().change_scene_to_file("res://scenes/ui/defeat.tscn")
|
||||
|
||||
func on_enemy_reward(value: int):
|
||||
data['resource'] += value
|
||||
|
|
|
@ -86,7 +86,7 @@ func on_enemy_entered_base(enemy):
|
|||
$CanvasLayer/GameStats.set_damage(enemy.damage)
|
||||
|
||||
if data['health'] < 1:
|
||||
print("Game Over")
|
||||
get_tree().change_scene_to_file("res://scenes/ui/defeat.tscn")
|
||||
|
||||
func on_enemy_reward(value: int):
|
||||
data['resource'] += value
|
||||
|
|
|
@ -86,7 +86,7 @@ func on_enemy_entered_base(enemy):
|
|||
$CanvasLayer/GameStats.set_damage(enemy.damage)
|
||||
|
||||
if data['health'] < 1:
|
||||
print("Game Over")
|
||||
get_tree().change_scene_to_file("res://scenes/ui/defeat.tscn")
|
||||
|
||||
func on_enemy_reward(value: int):
|
||||
data['resource'] += value
|
||||
|
|
|
@ -86,7 +86,7 @@ func on_enemy_entered_base(enemy):
|
|||
$CanvasLayer/GameStats.set_damage(enemy.damage)
|
||||
|
||||
if data['health'] < 1:
|
||||
print("Game Over")
|
||||
get_tree().change_scene_to_file("res://scenes/ui/defeat.tscn")
|
||||
|
||||
func on_enemy_reward(value: int):
|
||||
data['resource'] += value
|
||||
|
|
Loading…
Reference in a new issue