Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- extends Sprite
- var circlex = 0
- var xspeed = 1
- var scr_height
- var scr_width
- func _ready():
- set_process(true)
- pass
- func _process(delta):
- update()
- pass
- func _draw():
- scr_height = 400
- scr_width = 400
- draw_circle(Vector2(circlex,scr_height/2),20,Color(255,0,0))
- circlex = circlex + xspeed
- print(circlex)
- if circlex > 400:
- xspeed -=1
- if circlex < 0:
- xspeed +=1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement