fgm24/Assets/Scripts/Player/PlayerAnimationHandler.cs

34 lines
606 B
C#
Raw Normal View History

2024-02-03 11:42:50 +01:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlayerAnimationHandler : MonoBehaviour
{
Animator animator;
void Start()
{
animator = GetComponentInChildren<Animator>();
}
2024-02-03 13:07:46 +01:00
public void Idle()
2024-02-03 11:42:50 +01:00
{
2024-02-03 13:07:46 +01:00
animator.SetTrigger("Idle");
2024-02-03 11:42:50 +01:00
}
2024-02-03 13:07:46 +01:00
public void Run()
2024-02-03 11:42:50 +01:00
{
2024-02-03 13:07:46 +01:00
animator.SetTrigger("Run");
2024-02-03 11:42:50 +01:00
}
2024-02-03 13:07:46 +01:00
public void Swing()
2024-02-03 11:42:50 +01:00
{
2024-02-03 13:07:46 +01:00
animator.SetTrigger("Swing");
2024-02-03 11:42:50 +01:00
}
2024-02-03 13:07:46 +01:00
public void Mop()
2024-02-03 11:42:50 +01:00
{
2024-02-03 13:07:46 +01:00
animator.SetTrigger("Mop");
2024-02-03 12:21:41 +01:00
}
2024-02-03 13:07:46 +01:00
public void RunMop()
2024-02-03 12:21:41 +01:00
{
2024-02-03 13:07:46 +01:00
animator.SetTrigger("RunMop");
2024-02-03 11:42:50 +01:00
}
}