Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- extends Area2D
- # member variables here, example:
- # var a=2
- var player_grid = Vector2(64,0)
- var player_act = Vector2(64,0)
- func _ready():
- set_process_input(true)
- pass
- func _input(event):
- if Input.is_action_pressed("ui_left"):
- set_pos(get_pos() - player_grid)
- if Input.is_action_pressed("ui_right"):
- set_pos(get_pos() + player_grid)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement