Browse Source

Fix death occuring before round start

DricomDragon 4 years ago
parent
commit
d977621f1b
1 changed files with 5 additions and 4 deletions
  1. 5 4
      Player.gd

+ 5 - 4
Player.gd

@@ -80,10 +80,11 @@ func _on_tween_completed(_o, key):
 		move()
 
 func _on_crash(body):
-	die()
-	generate_wall()
-	# TODO : use enum for blocks
-	grid.set_cell(posix, posiy, 2)
+	if running:
+		die()
+		generate_wall()
+		# TODO : use enum for blocks
+		grid.set_cell(posix, posiy, 2)
 
 func generate_wall():
 	# TODO : use enum for blocks