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 VomitState : IStateMachine<Customer>
|
2024-10-20 17:21:39 +00:00
|
|
|
{
|
|
|
|
private bool _isVomiting;
|
|
|
|
|
|
|
|
public void EnterState(Customer character)
|
|
|
|
{
|
|
|
|
character.SpineController.PlayAnimation(CustomerSpineAnimation.VomitingForm, false);
|
|
|
|
}
|
|
|
|
|
|
|
|
public void UpdateState(Customer character)
|
|
|
|
{
|
|
|
|
if (character.SpineController.IsAnimationComplete())
|
|
|
|
{
|
|
|
|
character.SpineController.PlayAnimation(CustomerSpineAnimation.Vomiting, false);
|
|
|
|
_isVomiting = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (_isVomiting && character.SpineController.IsAnimationComplete())
|
|
|
|
{
|
|
|
|
character.InstanceVomit();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public void ExitState(Customer character)
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|