Compare commits
2 commits
68602e7f23
...
7b7334990b
| Author | SHA1 | Date | |
|---|---|---|---|
| 7b7334990b | |||
| 9823264882 |
3 changed files with 6 additions and 5 deletions
Binary file not shown.
|
|
@ -9,7 +9,8 @@ func _enter(_previous_state_path: String, _data: Dictionary[StringName, Variant]
|
|||
player.velocity = Vector2.ZERO
|
||||
player.move_and_slide()
|
||||
|
||||
player.sprite.play("idle")
|
||||
player.sprite.frame = 1
|
||||
player.sprite.pause()
|
||||
|
||||
print('entered')
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ func _state_physics_update(_delta: float) -> void:
|
|||
|
||||
if watch_state([WALKING]): return
|
||||
|
||||
if direction.y > 0:
|
||||
player.sprite.play("walk_down")
|
||||
if direction.y < 0:
|
||||
player.sprite.play("walk_up")
|
||||
if direction.y > 0: player.sprite.play("walk_down")
|
||||
elif direction.y < 0: player.sprite.play("walk_up")
|
||||
elif direction.x > 0: player.sprite.play("walk_right")
|
||||
elif direction.x < 0: player.sprite.play("walk_left")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue