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