CapersProject/Assets/02.Scripts/Character/Npc/Customer/State/UpsetState.cs

37 lines
1.0 KiB
C#
Raw Normal View History

2024-10-20 17:21:39 +00:00
using BlueWater.Interfaces;
namespace BlueWater.Npcs.Customers
{
2024-11-04 12:22:07 +00:00
public class UpsetState : IStateMachine<Customer>
2024-10-20 17:21:39 +00:00
{
public void EnterState(Customer character)
{
2024-12-17 12:54:30 +00:00
if (character.CustomerSkin == CustomerSkin.Cat)
{
character.SpineController.PlayAnimation(CatSpineAnimation.Upset, true);
}
else if (character.CustomerSkin == CustomerSkin.Witch)
{
character.SpineController.PlayAnimation(WitchSpineAnimation.Upset, true);
}
else
{
character.SpineController.PlayAnimation(CustomerSpineAnimation.Upset, true);
}
2024-10-20 17:21:39 +00:00
}
public void UpdateState(Customer character)
{
if (character.IsMoving)
{
2024-10-22 12:41:31 +00:00
character.StateMachineController.TransitionToState(character.WalkingState, character);
2024-10-20 17:21:39 +00:00
}
}
public void ExitState(Customer character)
{
}
}
}