Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Step Actions
- if not Input.is_action_pressed("ui_modifier"):
- var step_vector = Vector2()
- if Input.is_action_pressed("ui_up"):
- step_vector += Vector2( 0, -1 )
- if Input.is_action_pressed("ui_down"):
- step_vector += Vector2( 0, 1 )
- if Input.is_action_pressed("ui_left"):
- step_vector += Vector2( -1, 0 )
- if Input.is_action_pressed("ui_right"):
- step_vector += Vector2( 1, 0 )
- if Input.is_action_pressed("ui_up_left"):
- step_vector += Vector2( -1, -1 )
- if Input.is_action_pressed("ui_down_left"):
- step_vector += Vector2( -1, 1 )
- if Input.is_action_pressed("ui_up_right") :
- step_vector += Vector2( 1, -1 )
- if Input.is_action_pressed("ui_down_right") :
- step_vector +=( Vector2( 1, 1 )
- step(step_vector)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement