seeding-planets/gui/pointer/scripts/action_zone.gd

17 lines
346 B
GDScript

extends Sprite2D
class_name ActionZone
const OPACITY = 0.4
const ACTIVATED_COLOR = Color.TURQUOISE
const DEACTIVATED_COLOR = Color.REBECCA_PURPLE
var radius : int = 0
var active : bool = false
func _draw():
draw_circle(
Vector2.ZERO,
radius,
Color((ACTIVATED_COLOR if active else DEACTIVATED_COLOR), OPACITY)
)