16 lines
344 B
GDScript
16 lines
344 B
GDScript
extends Unit
|
|
|
|
func _ready() -> void:
|
|
unit_data=Database.get_unit_data(unit_data_from_id,unit_id)
|
|
super._ready()
|
|
state_machine.launch()
|
|
|
|
|
|
func _on_state_value_changed(state_value_name: String, value: Variant) -> void:
|
|
match state_value_name:
|
|
"hp":
|
|
%hp.value=value
|
|
"hp_max":
|
|
%hp.max_value=value
|
|
pass # Replace with function body.
|