CapersProject/Assets/02.Scripts/Character/Npc/Crew/State/ServingState.cs

40 lines
990 B
C#
Raw Normal View History

2024-10-14 11:13:08 +00:00
using BlueWater.Interfaces;
namespace BlueWater.Npcs.Crews
{
public class ServingState : IState<Crew>
{
public void EnterState(Crew character)
{
character.SpineController.PlayAnimation(CrewSpineAnimation.Serving, true);
}
public void UpdateState(Crew character)
{
if (character.IsMoving)
{
2024-10-20 17:21:39 +00:00
if (!character.IsServing)
{
character.TransitionToState(character.WalkingState);
}
2024-10-14 11:13:08 +00:00
}
else if (!character.IsMoving)
{
2024-10-20 17:21:39 +00:00
if (character.IsServing)
{
character.TransitionToState(character.ServingIdleState);
}
else
{
character.TransitionToState(character.IdleState);
}
2024-10-14 11:13:08 +00:00
}
}
public void ExitState(Crew character)
{
}
}
}