修改类名

This commit is contained in:
2025-04-10 11:46:42 +08:00
parent fac2dcf943
commit be7c63614b
4 changed files with 8 additions and 13 deletions

View File

@@ -3,7 +3,7 @@ using UnityEngine;
namespace Stary.Evo.FiniteStateMachine
{
public interface IFSMManager
public interface IFsmSystem
{
IFSMIState CurState { get; set; }
void AddState(IFSMIState state);
@@ -13,20 +13,15 @@ namespace Stary.Evo.FiniteStateMachine
Dictionary<string, IFSMIState> States { get; set; }
}
public class FSMManager : IFSMManager
public class FsmSystem : IFsmSystem
{
public IFSMIState CurState { get; set; }
public Dictionary<string, IFSMIState> States { get; set; }
public FSMManager()
{
States = new Dictionary<string, IFSMIState>();
}
public Dictionary<string, IFSMIState> States { get; set; } = new();
public void AddState(IFSMIState state)
{
Debug.Log(state.Name);
if (!States.ContainsKey(state.Name))
if (!States.ContainsKey(state.Name))
{
States.Add(state.Name, state);
}