15 lines
278 B
GDScript
15 lines
278 B
GDScript
|
class_name ColorComponent
|
||
|
extends Node
|
||
|
|
||
|
export var color = Color(1, 0, 1)
|
||
|
|
||
|
signal color_changed(color)
|
||
|
|
||
|
# Called when the node enters the scene tree for the first time.
|
||
|
func _ready():
|
||
|
set_color(color)
|
||
|
|
||
|
func set_color(c : Color):
|
||
|
color = c
|
||
|
emit_signal("color_changed", color)
|