Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- draw_primitive(Vector2Array([Vector2(0,0),Vector2(100,300),Vector2(90,0)]),ColorArray([Color(1,1,0),Color(1,0,0),Color(1,0,0)]))
- func _process(delta):
- update()
- func _ready():
- set_process(true)
- which doesnt draw anything and romullox_x kindly provided workaround:
- extends Node2D
- var myColorArray = ColorArray()
- func _draw():
- for color in [Color(1,0,0),Color(1,0,0),Color(1,0,0)]:
- myColorArray.push_back(color)
- draw_primitive([Vector2(0,100),Vector2(100,300),Vector2(90,0)], myColorArray)
- pass
- func _process(delta):
- update()
- func _ready():
- set_process(true)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement