40 lines
994 B
C#
40 lines
994 B
C#
![]() |
using BlueWater.Interfaces;
|
||
|
|
||
|
namespace BlueWater.Npcs.Crews
|
||
|
{
|
||
|
public class ServingIdleState : IState<Crew>
|
||
|
{
|
||
|
public void EnterState(Crew character)
|
||
|
{
|
||
|
character.SpineController.PlayAnimation(CrewSpineAnimation.ServingIdle, true);
|
||
|
}
|
||
|
|
||
|
public void UpdateState(Crew character)
|
||
|
{
|
||
|
if (character.IsMoving)
|
||
|
{
|
||
|
if (character.IsServing)
|
||
|
{
|
||
|
character.TransitionToState(character.WalkingState);
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
character.TransitionToState(character.ServingState);
|
||
|
}
|
||
|
}
|
||
|
else if (!character.IsMoving)
|
||
|
{
|
||
|
if (!character.IsServing)
|
||
|
{
|
||
|
character.TransitionToState(character.IdleState);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public void ExitState(Crew character)
|
||
|
{
|
||
|
|
||
|
}
|
||
|
}
|
||
|
}
|