23 lines
546 B
GDScript3
Raw Normal View History

2020-02-01 11:29:43 +01:00
extends PushingBodyPart
2020-01-31 22:34:46 +01:00
2020-02-01 11:29:43 +01:00
onready var anim = get_node("Mesh/AnimationPlayer")
2020-01-31 23:46:09 +01:00
2020-02-01 10:49:43 +01:00
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass # Replace with function body.
2020-01-31 23:46:09 +01:00
2020-02-01 11:29:43 +01:00
func action():
2020-02-01 12:14:28 +01:00
anim.play("ArmatureAction001")
2020-02-01 11:29:43 +01:00
func push(body):
# TODO: Hardcoded values - maybe try to generalize
base.apply_impulse(transform.basis.xform(Vector3(0.0, 0.0, -3.0)), base.transform.basis.y * 10.0)
2020-02-01 10:49:43 +01:00
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta: float) -> void:
# pass