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 IdleState : IStateMachine<Customer>
|
2024-10-20 17:21:39 +00:00
|
|
|
{
|
|
|
|
public void EnterState(Customer character)
|
|
|
|
{
|
|
|
|
if (character.IsVomited)
|
|
|
|
{
|
|
|
|
character.SpineController.PlayAnimation(CustomerSpineAnimation.VomitingIdle, true);
|
|
|
|
}
|
|
|
|
else if (character.IsReceivedItem)
|
|
|
|
{
|
2024-11-15 07:28:13 +00:00
|
|
|
character.SpineController.PlayAnimation(character.IsOrderedCorrected ?
|
2024-10-20 17:21:39 +00:00
|
|
|
CustomerSpineAnimation.Happy : CustomerSpineAnimation.Upset, true);
|
|
|
|
}
|
|
|
|
else if (!character.IsReceivedItem)
|
|
|
|
{
|
|
|
|
character.SpineController.PlayAnimation(CustomerSpineAnimation.Idle, true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
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)
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|