CapersProject/Assets/02.Scripts/BlueWater/Character/Npc/Customer/State/HappyState.cs

37 lines
1016 B
C#
Raw Normal View History

2025-02-10 02:13:46 +00:00
using DDD.Interfaces;
2024-10-20 17:21:39 +00:00
2025-02-10 02:13:46 +00:00
namespace DDD.Npcs.Customers
2024-10-20 17:21:39 +00:00
{
2024-11-04 12:22:07 +00:00
public class HappyState : 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.Happy, true);
}
else if (character.CustomerSkin == CustomerSkin.Witch)
{
character.SpineController.PlayAnimation(WitchSpineAnimation.Happy, true);
}
else
{
character.SpineController.PlayAnimation(CustomerSpineAnimation.Happy, 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)
{
}
}
}