Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- extends Node2D
- var y = 0
- var yspeed = 1
- var screenheight = 200
- func _ready():
- set_process(true)
- func _process(delta):
- update()
- func _draw():
- draw_line(Vector2(0,y),Vector2(200,y),Color(255,0,0))
- y = y + yspeed
- if(y > screenheight):
- yspeed-=1
- if(y < 0):
- yspeed+=1
- print(y)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement