14 lines
261 B
GDScript3
14 lines
261 B
GDScript3
|
extends Spatial
|
||
|
|
||
|
export(NodePath) var animatorPath
|
||
|
|
||
|
var animator
|
||
|
|
||
|
func _ready():
|
||
|
get_parent().call_deferred("SetModel", self)
|
||
|
animator = get_node(animatorPath)
|
||
|
animator.play(name + "Idle")
|
||
|
|
||
|
func setAnimation(state):
|
||
|
animator.play(name + state)
|