Advertisement
otorp2

draw with notification

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