Advertisement
otorp2

ball gdot

Feb 24th, 2019
422
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. extends Node2D
  2. var red = 0
  3. var speed = .01
  4.  
  5.  
  6.  
  7. #warning-ignore:unused_class_variable
  8. var point1 = Vector2(1,2)
  9.  
  10. # Called when the node enters the scene tree for the first time.
  11. func _ready():
  12.  
  13. pass # Replace with function body.
  14.  
  15.  
  16. #warning-ignore:unused_argument
  17. func _process(delta):
  18. update()
  19.  
  20.  
  21. pass
  22. func _draw():
  23. red = red + speed
  24.  
  25. if red > 1 or red < 0:
  26. speed = speed * -1
  27.  
  28.  
  29.  
  30.  
  31.  
  32. print(red)
  33. draw_circle(Vector2(red*1000,red*500+50),500*red,Color(red,0,red))
  34.  
  35.  
  36.  
  37. pass
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement