public XFsmComponent() { XFsmStateComponent startState = new XFsmStateComponent(); startState.name = "Start"; RegistState(startState); }
public void UngistState(XFsmStateComponent state) { if (fsmState.Count > 0) { state.OnwerFsm = null; fsmState.Remove(state); } }
public void RegistState(XFsmStateComponent state) { state.OnwerFsm = this; fsmState.Add(state as XFsmStateComponent); }