|
@@ -3,6 +3,7 @@ extends Node2D
|
|
|
onready var cam = $MainCamera
|
|
|
onready var start_timer = $StartTimer
|
|
|
|
|
|
+var is_round_won
|
|
|
signal round_won
|
|
|
signal arena_removed
|
|
|
|
|
@@ -93,5 +94,9 @@ func create_game():
|
|
|
start_timer.start()
|
|
|
|
|
|
func _on_player_crash():
|
|
|
- if get_tree().get_nodes_in_group("running").size() <= 1:
|
|
|
+ if get_tree().get_nodes_in_group("running").size() <= 1 and !is_round_won:
|
|
|
emit_signal("round_won")
|
|
|
+ is_round_won = true
|
|
|
+
|
|
|
+func _on_start_game():
|
|
|
+ is_round_won = false
|