Quellcode durchsuchen

Fix possibility to start a new round before its end

Was causing a bug by the way.
DricomDragon vor 4 Jahren
Ursprung
Commit
efe280ba8b
1 geänderte Dateien mit 3 neuen und 5 gelöschten Zeilen
  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