27 lines
649 B
C#
27 lines
649 B
C#
|
using Godot;
|
||
|
|
||
|
namespace SupaLidlGame.State.Character
|
||
|
{
|
||
|
public partial class NPCIdleState : NPCState
|
||
|
{
|
||
|
[Export]
|
||
|
public CharacterState MoveState { get; set; }
|
||
|
|
||
|
public override CharacterState Process(double delta)
|
||
|
{
|
||
|
base.Process(delta);
|
||
|
if (Character.Direction.LengthSquared() > 0)
|
||
|
{
|
||
|
return MoveState;
|
||
|
}
|
||
|
return null;
|
||
|
}
|
||
|
|
||
|
public override IState<CharacterState> Enter(IState<CharacterState> previousState)
|
||
|
{
|
||
|
Character.Sprite.Play("idle");
|
||
|
return base.Enter(previousState);
|
||
|
}
|
||
|
}
|
||
|
}
|