mirror of
https://github.com/Relintai/entity-spell-system-addons.git
synced 2024-11-14 22:57:18 +01:00
37 lines
707 B
GDScript
37 lines
707 B
GDScript
tool
|
|
extends OmniLight
|
|
class_name PropToolLight
|
|
|
|
var _prop_light : PropDataLight
|
|
|
|
#func _ready():
|
|
# set_notify_transform(true)
|
|
|
|
func get_data() -> PropDataLight:
|
|
if not visible:
|
|
return null
|
|
|
|
if _prop_light == null:
|
|
_prop_light = PropDataLight.new()
|
|
|
|
_prop_light.light_color = light_color
|
|
_prop_light.light_size = omni_range
|
|
|
|
return _prop_light
|
|
|
|
func set_data(light : PropDataLight) -> void:
|
|
_prop_light = light
|
|
|
|
light_color = _prop_light.light_color
|
|
omni_range = _prop_light.light_size
|
|
light_energy = _prop_light.light_size
|
|
|
|
#func save():
|
|
# if get_node("..").has_method("save"):
|
|
# get_node("..").save()
|
|
#
|
|
#func _notification(what):
|
|
# if what == NOTIFICATION_TRANSFORM_CHANGED:
|
|
# save()
|
|
|