Advertisement
Guest User

Untitled

a guest
Feb 19th, 2020
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. extends Node2D
  2.  
  3. const SPEED = 500
  4.  
  5.  
  6. func _physics_process(delta):
  7. if Input.is_action_pressed("left"):
  8. position.x -= SPEED * delta
  9. if Input.is_action_pressed("right"):
  10. position.x += SPEED * delta
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement