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):
|
2020-02-01 12:49:20 +01:00
|
|
|
# We multiply by 0.1 because we only want it to spin slightly, it should mostly go up
|
2020-02-01 16:15:37 +01:00
|
|
|
base.apply_impulse(transform.basis.xform(touch_area.global_transform.origin - global_transform.origin) * 0.1, base.transform.basis.y * 5.0)
|
2020-02-01 11:29:43 +01:00
|
|
|
|
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
|