Explorar o código

Fix possibility to start a new round before its end

Was causing a bug by the way.
DricomDragon %!s(int64=5) %!d(string=hai) anos
pai
achega
efe280ba8b
Modificáronse 1 ficheiros con 3 adicións e 5 borrados
  1. 3 5
      Game.gd

+ 3 - 5
Game.gd

@@ -57,11 +57,9 @@ func load_level(name):
 
 func _unhandled_input(event):
 	if event.is_action("ui_accept") and event.is_pressed():
-		if get_tree().has_group("running"):
-			var running = get_tree().get_nodes_in_group("running")
-			if !running.empty():
-				return
-		create_game()
+		if is_round_won == null or is_round_won:
+			is_round_won = false
+			create_game()
 
 func create_game():
 	# Clear if required