This commit is contained in:
CortexCore
2023-11-06 01:17:23 +08:00
parent bd40165ade
commit 5446067f91
114 changed files with 2023 additions and 414 deletions

View File

@@ -7,7 +7,7 @@ using UnityEngine;
namespace BITKit.Entities
{
public class StateBasedComponent<T> : EntityComponent,IStateMachine<T> where T : IState
public class StateBasedBehavior<T> : EntityBehavior,IStateMachine<T> where T : IState
{
[SerializeField] private MonoStateMachine<T> stateMachine;
public bool Enabled
@@ -28,9 +28,9 @@ namespace BITKit.Entities
remove => stateMachine.OnStateChanged -= value;
}
public IDictionary<Type, T> StateDictionary => stateMachine.StateDictionary;
public override void Initialize(IEntity _entity)
public override void Initialize(IEntity entity)
{
base.Initialize(_entity);
base.Initialize(entity);
if (stateMachine is null)
{
Debug.LogWarning(GetType().Name);