Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- extends Node2D
- var draw_list = []
- func _ready():
- set_fixed_process(true)
- set_process(true)
- draw_list = [Vector2(0, 0), Vector2(250, 10), Vector2(50, 300), Vector2(500, 500)]
- func _fixed_process(delta):
- pass
- func _process(delta):
- update()
- func _draw():
- if draw_list != []:
- var temp_draw_list = []
- for ob in draw_list:
- temp_draw_list.append(ob)
- if temp_draw_list != []:
- if temp_draw_list != draw_list:
- draw_line(temp_draw_list[temp_draw_list.size()-1], draw_list[temp_draw_list.size()], Color(1.0, 1.0, 0.5, 1.0), 3)
- print(ob)
Add Comment
Please, Sign In to add comment