Exemplo n.º 1
0
        public void Init(int index)
        {
            OnVariableUpdate += VariableUpdate;
            int i = TaskManager.Instance.GetTaskVariable(variableName);

            state = ConditionState.Listening;
            switch (mode)
            {
            case 0:
                if (i == value)
                {
                    state = ConditionState.Completed;
                }

                break;

            case 1:
                if (i > value)
                {
                    state = ConditionState.Completed;
                }

                break;

            case 2:
                if (i < value)
                {
                    state = ConditionState.Completed;
                }

                break;
            }
        }
Exemplo n.º 2
0
 public void DeInit()
 {
     state             = ConditionState.Uninitialized;
     OnVariableUpdate -= VariableUpdate;
 }