extends Node3D
var animacion_actual = "Default simplifiedAction"
func _ready() -> void:
# Reproduce la animación principal en bucle
$AnimationPlayer.play("Default simplifiedAction", -1)
func _input(event):
if event is InputEventMouseButton:
if event.pressed and event.button_index == 1:
# Pausa la animación principal y encola la secundaria
$AnimationPlayer.stop()
$AnimationPlayer.play("Default simplified|INFLACABEZA")
elif event.button_index == 1 and not event.pressed:
# Reanuda la animación principal
$AnimationPlayer.play("Default simplifiedAction", -1)
if event.pressed and event.button_index == 2:
# Pausa la animación principal y encola la secundaria
$AnimationPlayer.stop()
$AnimationPlayer.play("Default simplified|INFLACABEZA")
elif event.button_index == 1 and not event.pressed:
# Reanuda la animación principal
$AnimationPlayer.play("Default simplifiedAction", -1)
No hay comentarios:
Publicar un comentario