Advertisement
otorp2

another draw notification

Jan 8th, 2016
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. extends Node2D
  2.  
  3.  
  4. func _ready():
  5. update()
  6.  
  7. func _notification(what):
  8. for i in range(0,200,10):
  9. i+=1
  10. print(i)
  11.  
  12. if what == NOTIFICATION_DRAW:
  13. draw_line(Vector2(i,50),Vector2(50,200),Color(1,1,1),5)
  14. draw_line(Vector2(50,50),Vector2(100,200),Color(1,0,0),5)
  15.  
  16. # or, instead of `_notification`:
  17.  
  18. func _draw():
  19.  
  20. draw_line(Vector2(80,50),Vector2(80,200),Color(1,1,1),5)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement