diff --git a/Runtime/FSM/SimpleFSM.cs b/Runtime/FSM/SimpleFSM.cs index 5e0dd12..182ea45 100644 --- a/Runtime/FSM/SimpleFSM.cs +++ b/Runtime/FSM/SimpleFSM.cs @@ -3,7 +3,7 @@ using System.Runtime.CompilerServices; using AlicizaX; -public interface IState : IMemory +public interface IState { IUltraFSM Fsm { get; set; } bool IsRegistered { get; set; } @@ -16,13 +16,6 @@ public interface IState : IMemory public abstract class StateBase : IState where TState : Enum { - public void Clear() - { - IsRegistered = false; - Fsm = null; - } - - public bool fromPool { get; set; } public IUltraFSM Fsm { get; set; } public bool IsRegistered { get; set; } @@ -160,7 +153,7 @@ public sealed class SimpleFSM : IUltraFSM where TState : Enum } [MethodImpl(MethodImplOptions.AggressiveInlining)] - public void Register(TState stateId) where T : class, IMemory, IState, new() + public void Register(TState stateId) where T : class, IState, new() { int stateIdValue = Convert.ToInt32(stateId); if (stateIdValue < 0) @@ -174,7 +167,6 @@ public sealed class SimpleFSM : IUltraFSM where TState : Enum if (existingState != null && existingState.IsRegistered) { existingState.Destroy(); - MemoryPool.Release(existingState); _registeredCount--; }