2020-02-02 16:03:44 +01:00

23 lines
488 B
GDScript

extends BodyPart
onready var anim = get_node("Mesh/AnimationPlayer")
onready var timer = get_node("Timer")
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass # Replace with function body.
func action():
if timer.time_left == 0:
anim.play("ArmatureAction")
var offset = transform.basis.xform(Vector3.ZERO)
var direction = (-base.transform.basis.z).normalized() * 30.0
base.apply_impulse(offset, direction)
timer.start()