Advertisement
otorp2

eskas simple mydraw_line array

Jan 10th, 2016
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. extends Node2D
  2.  
  3. var myarr = [] # same as myarr = Array()
  4.  
  5. func _ready():
  6. myarr = [-64,-32,-8,0,8,32,64]
  7. update()
  8.  
  9. func _draw():
  10. var col = Color(1,0,0)
  11. for pos_x in myarr: # same as pos_x in [-64,-32,-8,0,8,32,64]
  12. draw_line( Vector2(), Vector2(pos_x, 32), col, 2)
  13. # Vector2() is same as Vector2(0,0)#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement