mirror of
https://github.com/Relintai/godot-steering-ai-framework.git
synced 2024-12-24 05:37:15 +01:00
27 lines
562 B
GDScript3
27 lines
562 B
GDScript3
|
tool
|
||
|
extends CollisionShape2D
|
||
|
|
||
|
export (Color) var inner_color := Color() setget set_inner_color
|
||
|
export (Color) var outer_color := Color() setget set_outer_color
|
||
|
export (float) var stroke := 0.0 setget set_stroke
|
||
|
|
||
|
|
||
|
func _draw() -> void:
|
||
|
draw_circle(Vector2.ZERO, shape.radius + stroke, outer_color)
|
||
|
draw_circle(Vector2.ZERO, shape.radius, inner_color)
|
||
|
|
||
|
|
||
|
func set_inner_color(val: Color) -> void:
|
||
|
inner_color = val
|
||
|
update()
|
||
|
|
||
|
|
||
|
func set_outer_color(val: Color) -> void:
|
||
|
outer_color = val
|
||
|
update()
|
||
|
|
||
|
|
||
|
func set_stroke(val: float) -> void:
|
||
|
stroke = val
|
||
|
update()
|