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 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)
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|