2022-11-13 15:42:04 -08:00
|
|
|
using Godot;
|
|
|
|
|
|
|
|
namespace SupaLidlGame.Characters.State
|
|
|
|
{
|
|
|
|
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;
|
|
|
|
}
|
2022-11-19 21:21:12 -08:00
|
|
|
|
|
|
|
public override CharacterState Enter(CharacterState previousState)
|
|
|
|
{
|
|
|
|
Character.Sprite.Play("idle");
|
|
|
|
return base.Enter(previousState);
|
|
|
|
}
|
2022-11-13 15:42:04 -08:00
|
|
|
}
|
|
|
|
}
|