Advertisement
Guest User

Untitled

a guest
Feb 20th, 2018
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.80 KB | None | 0 0
  1. # Step Actions
  2.         if not Input.is_action_pressed("ui_modifier"):
  3.             var step_vector = Vector2()
  4.             if Input.is_action_pressed("ui_up"):
  5.                  step_vector += Vector2( 0, -1 )
  6.             if Input.is_action_pressed("ui_down"):
  7.                  step_vector +=  Vector2( 0, 1 )           
  8.             if Input.is_action_pressed("ui_left"):
  9.                  step_vector +=  Vector2( -1, 0 )  
  10.             if Input.is_action_pressed("ui_right"):
  11.                  step_vector +=  Vector2( 1, 0 )           
  12.             if Input.is_action_pressed("ui_up_left"):
  13.                  step_vector +=  Vector2( -1, -1 )         
  14.             if Input.is_action_pressed("ui_down_left"):
  15.                  step_vector += Vector2( -1, 1 )           
  16.             if Input.is_action_pressed("ui_up_right") :
  17.                  step_vector +=  Vector2( 1, -1 )          
  18.             if Input.is_action_pressed("ui_down_right") :
  19.                  step_vector +=( Vector2( 1, 1 )
  20.             step(step_vector)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement