Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- func update_sprite():
- var aux = ((velocity.x * 3) + velocity.y) +15000
- var directions = {15000: "right", 20000: "right", 1: "nothing"}
- var facing = directions[aux]
- #match aux:
- # 15000:
- # facing = "right"
- # 2,-1:
- # facing = "up"
- # -4,-3:
- # facing = "left"
- # -2,1:
- # facing = "down"
- var state = "idle_"
- if velocity.x !=0 || velocity.y !=0:
- state = "walk_"
- #emit_signal(state + directions[aux])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement