Basic Movement and Map Generation #22

Merged
Snoweuph merged 17 commits from dev-base into stable 2023-04-08 00:41:10 +00:00
Showing only changes of commit 8e03e10593 - Show all commits

View file

@ -33,5 +33,11 @@ func update_player_animation():
Vector2.RIGHT: animation_player.play("MoveRight") Vector2.RIGHT: animation_player.play("MoveRight")
Vector2.UP: animation_player.play("MoveUp") Vector2.UP: animation_player.play("MoveUp")
Vector2.DOWN: animation_player.play("MoveDown") Vector2.DOWN: animation_player.play("MoveDown")
_: animation_player.play("Idle") _: handle_diagonal_animations(move_vector)
pass
func handle_diagonal_animations(dir : Vector2):
if (dir.y > 0 and dir.x < 0) or (dir.y < 0 and dir.x < 0): animation_player.play("MoveLeft")
elif (dir.y > 0 and dir.x > 0) or (dir.y < 0 and dir.x > 0): animation_player.play("MoveRight")
else: animation_player.play("Idle")
pass pass