Beispiel #1
0
//-----------------------------------------------------------------


//-----------------------------------------------------------------
/// <summary>
/// constructor to restore state machine
/// </summary>
/// <param name="line">Line.</param>
/// <param name="target_">Target_.</param>
/// <param name="currentStateID">Current state I.</param>
        public FSM(string line, stateControllerInterface target_, int currentStateID)
        {
            target = target_;
            line   = line.Replace(" ", "");
            loadStateMachine(line);
            state = getState(currentStateID);
        }
Beispiel #2
0
//-----------------------------------------------------------------


//-----------------------------------------------------------------
/// <summary>
/// Initializes a new instance of the <see cref="FSM_NS.FSM"/> class.
/// </summary>
/// <param name="line">Line.</param>
/// <param name="target_">Target_.</param>
        public FSM(string line, stateControllerInterface target_)
        {
            target = target_;
            line   = line.Replace(" ", "");
            line   = stripComments(line.Split('\n'));

            loadStateMachine(line);
            state = states[0];
        }