public override void Init() { state.name = name; state.fsm = fsm; state.Init(); }
override public void Init() { state.name = name; state.fsm = fsm; state.mono = mono; state.Init(); }
/// <summary> /// Adds a new node / state to the state machine /// </summary> /// <param name="name">The name / identifier of the new state</param> /// <param name="state">The new state instance, e.g. <c>State</c>, <c>CoState</c>, <c>StateMachine</c></param> public void AddState(string name, StateBase state) { state.fsm = this; state.name = name; state.mono = mono; state.Init(); nameToState[name] = state; if (nameToState.Count == 1 && startState == null) { SetStartState(name); } }