示例#1
0
        public void Init(GQHSMState parent)
        {
            base.Init();
            _parent = parent;
            if (ChildStates != null)
            {
                foreach (GQHSMState gs in ChildStates)
                {
                    gs.Init(this);
                }
            }

            if (EntryAction.Length > 0)
            {
                _entryActions = new GQHSMActions(_parentHSM, EntryAction);
            }

            if (ExitAction.Length > 0)
            {
                _exitActions = new GQHSMActions(_parentHSM, ExitAction);
            }

            if ((_stateCommands != null) && (_stateCommands.Length > 0))
            {
                _actions = new GQHSMActions(_parentHSM, _stateCommands);
            }
        }
示例#2
0
        public void Init(int slot)
        {
            base.Init();
            _slot = slot;
            if (TimeOutExpression.Length > 0)
            {
                _parentHSM.RegisterTimeOutExpression(this, TimeOutExpression);
            }

            if (Action.Length > 0)
            {
                _actions = new GQHSMActions(_parentHSM, Action);
            }

            if (GuardCondition.Length > 0)
            {
                _guards = new GQHSMActions(_parentHSM, GuardCondition);
            }
        }