2024-10-11 10:12:15 +08:00
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
namespace Ether
|
|
|
|
{
|
2024-10-30 17:58:20 +08:00
|
|
|
public abstract class StateBase
|
2024-10-11 10:12:15 +08:00
|
|
|
{
|
2024-10-30 17:58:20 +08:00
|
|
|
public StateMachine StateMachine{ get; set; }
|
|
|
|
|
|
|
|
public abstract void Enter();
|
|
|
|
public abstract void Execute();
|
|
|
|
public abstract void Exit();
|
2024-10-11 10:12:15 +08:00
|
|
|
}
|
|
|
|
|
2024-10-30 17:58:20 +08:00
|
|
|
public class IdleState : StateBase
|
2024-10-11 10:12:15 +08:00
|
|
|
{
|
2024-10-30 17:58:20 +08:00
|
|
|
public override void Enter()
|
2024-10-11 10:12:15 +08:00
|
|
|
{
|
2024-10-30 17:58:20 +08:00
|
|
|
Debug.LogError("IdleState Enter");
|
2024-10-11 10:12:15 +08:00
|
|
|
}
|
2024-10-30 17:58:20 +08:00
|
|
|
|
|
|
|
public override void Execute()
|
2024-10-11 10:12:15 +08:00
|
|
|
{
|
2024-10-30 17:58:20 +08:00
|
|
|
|
2024-10-11 10:12:15 +08:00
|
|
|
}
|
|
|
|
|
2024-10-30 17:58:20 +08:00
|
|
|
public override void Exit()
|
2024-10-11 10:12:15 +08:00
|
|
|
{
|
2024-10-30 17:58:20 +08:00
|
|
|
|
2024-10-11 10:12:15 +08:00
|
|
|
}
|
|
|
|
}
|
2024-10-30 17:58:20 +08:00
|
|
|
}
|