Files
back_cantanBuilding/Assets/Scripts/UI/Washing/EventWashingFinger.cs
2026-05-26 16:15:54 +08:00

42 lines
806 B
C#

using Spine;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class EventWashingFinger : MonoBehaviour
{
Animator animator;
void Awake()
{
animator = this.GetComponent<Animator>();
SetAnimationEnabled(false);
}
public void PlayAnimationForPainting()
{
PlayAnimation("finger_loop_wash");
}
public void PlayAnimationDefault()
{
PlayAnimation("finger_loop_wash2");
}
private void PlayAnimation(string name)
{
SetAnimationEnabled(true);
if (animator != null)
{
animator.Play(name);
}
}
public void SetAnimationEnabled(bool enabled)
{
if (animator != null)
{
animator.enabled = enabled;
}
}
}