Browse Source

Wait one move to put a wall

Avoid to put a wall on the player itself.
DricomDragon 5 years ago
parent
commit
23d9cc840b
1 changed files with 2 additions and 2 deletions
  1. 2 2
      Player.gd

+ 2 - 2
Player.gd

@@ -57,6 +57,8 @@ func _physics_process(delta):
 	if is_moving:
 		return
 
+	grid.set_cell(posix - dirx, posiy - diry, 1)
+
 	dire += dire_delta
 
 	if dire_delta == -1:
@@ -72,8 +74,6 @@ func _physics_process(delta):
 	turn(dire)
 	dire_delta = 0
 
-	grid.set_cell( posix, posiy, 1)
-
 	posix += dirx
 	posiy += diry