13 lines
297 B
GDScript
13 lines
297 B
GDScript
extends MeshInstance3D
|
|
|
|
@onready var animation_player: AnimationPlayer = $AnimationPlayer
|
|
var isPickedUp:bool = false
|
|
|
|
func _on_interactable_on_hit() -> void:
|
|
isPickedUp = !isPickedUp
|
|
print("hit")
|
|
if isPickedUp:
|
|
animation_player.play("phone_pickzup")
|
|
else:
|
|
animation_player.play("Hangup")
|