Explorar el Código

Shuffle levels when restarting a game

DricomDragon hace 5 años
padre
commit
f484b6761c
Se han modificado 1 ficheros con 1 adiciones y 0 borrados
  1. 1 0
      Game.gd

+ 1 - 0
Game.gd

@@ -55,6 +55,7 @@ func create_game():
 
 		if (levelIndex >= levelScenes.size()):
 			levelIndex = 0
+			levelScenes.shuffle()
 
 		if !levelScenes[levelIndex]:
 			levelScenes[levelIndex] = load_level(levelNames[levelIndex])