19 lines
413 B
GDScript
19 lines
413 B
GDScript
class_name TintedSpriteComponent
|
|
extends Sprite
|
|
|
|
export var tint_color = Color (1, 1, 1)
|
|
|
|
# Called when the node enters the scene tree for the first time.
|
|
func _ready():
|
|
pass
|
|
|
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
func _process(delta):
|
|
if Engine.editor_hint:
|
|
modulate = tint_color
|
|
|
|
func set_color_tint(color: Color):
|
|
tint_color = color
|
|
modulate = tint_color
|
|
update()
|