Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- extends Node2D
- var y = 0
- var speed = 0
- var gravity = .01
- func _ready():
- set_process(true)
- pass
- func _process(delta):
- y = y + speed
- speed = speed + gravity
- get_node("ship").set_pos(Vector2(150,y))
- print(y)
- if y > 400:
- speed = speed * - .95
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement