32 lines
683 B (Stored with Git LFS)
C#
32 lines
683 B (Stored with Git LFS)
C#
namespace DDD
|
|
{
|
|
public class IdleState : IStateMachine
|
|
{
|
|
private RestaurantPlayer _player;
|
|
private RestaurantPlayerView _view;
|
|
|
|
public IdleState(RestaurantPlayer player, RestaurantPlayerView view)
|
|
{
|
|
_player = player;
|
|
_view = view;
|
|
}
|
|
|
|
public void Enter()
|
|
{
|
|
_view.PlayAnimation(RestaurantSpineAnimation.Idle, true);
|
|
}
|
|
|
|
public void Update()
|
|
{
|
|
if (_player.IsMoving)
|
|
{
|
|
_player.ChangeState(new WalkingState(_player, _view));
|
|
}
|
|
}
|
|
|
|
public void Exit()
|
|
{
|
|
|
|
}
|
|
}
|
|
} |