38 lines
1.0 KiB
C#
38 lines
1.0 KiB
C#
![]() |
using BlueWater.Interfaces;
|
||
|
|
||
|
namespace BlueWater.Npcs.Customers
|
||
|
{
|
||
|
public class WalkingState : IState<Customer>
|
||
|
{
|
||
|
public void EnterState(Customer character)
|
||
|
{
|
||
|
if (character.IsVomited)
|
||
|
{
|
||
|
character.SpineController.PlayAnimation(CustomerSpineAnimation.VomitingRun, true);
|
||
|
}
|
||
|
else if (character.IsReceivedItem)
|
||
|
{
|
||
|
character.SpineController.PlayAnimation(character.IsOrderedSucceed ?
|
||
|
CustomerSpineAnimation.HappyRun : CustomerSpineAnimation.UpsetRun, true);
|
||
|
}
|
||
|
else if (!character.IsReceivedItem)
|
||
|
{
|
||
|
character.SpineController.PlayAnimation(CustomerSpineAnimation.Walk, true);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public void UpdateState(Customer character)
|
||
|
{
|
||
|
if (!character.IsMoving)
|
||
|
{
|
||
|
character.TransitionToState(character.IdleState);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public void ExitState(Customer character)
|
||
|
{
|
||
|
|
||
|
}
|
||
|
}
|
||
|
}
|