35 lines
627 B
C#
35 lines
627 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class PlayerAnimationHandler : MonoBehaviour
|
|
{
|
|
Animator animator;
|
|
|
|
void Start()
|
|
{
|
|
animator = GetComponentInChildren<Animator>();
|
|
}
|
|
|
|
public void Idle()
|
|
{
|
|
animator.SetTrigger("Idle");
|
|
}
|
|
public void Run(bool state)
|
|
{
|
|
animator.SetBool("IsRunning", state);
|
|
}
|
|
public void Swing()
|
|
{
|
|
animator.SetTrigger("Swing");
|
|
}
|
|
public void Mop()
|
|
{
|
|
animator.SetTrigger("Mop");
|
|
}
|
|
public void RunMop()
|
|
{
|
|
animator.SetTrigger("RunMop");
|
|
}
|
|
}
|