Skip to content
Snippets Groups Projects
Commit bbff8c1b authored by Pablau's avatar Pablau
Browse files

safety changes on gameOver

parent 358aeb35
No related branches found
No related tags found
No related merge requests found
...@@ -45,8 +45,8 @@ func check_for_drown(poly): ...@@ -45,8 +45,8 @@ func check_for_drown(poly):
for child in get_children(): for child in get_children():
if child is Penguin: if child is Penguin:
Globals.create_skull(child.global_position) Globals.create_skull(child.global_position)
Globals.pengu_group.penguins.remove(child) Globals.pengu_group.n_penguins-=1
if(Globals.pengu_group.penguins.empty()): if(Globals.pengu_group.n_penguins<=0):
Globals.current_state=Globals.GAME_STATE.GAMEOVER Globals.current_state=Globals.GAME_STATE.GAMEOVER
func _exit_tree() -> void: func _exit_tree() -> void:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment