public override bool IsConditionMet(StateMachineComponent stateMachine)
            {
                object boolNode = _saveData.GetSaveDataValue();

                if (boolNode != null && SystemUtils.IsTypeOf(typeof(bool), boolNode.GetType()))
                {
                    return((bool)boolNode == _value);
                }

                return(false);
            }
示例#2
0
            public override bool IsConditionMet(StateMachineComponent stateMachine)
            {
                object enumNode = _saveData.GetSaveDataValue();

                if (enumNode != null && enumNode.GetType().IsEnum)
                {
                    //Get child with id as int, compare to our value
                    int enumIntValue = Convert.ToInt32(enumNode);
                    return(_value == enumIntValue);
                }

                return(false);
            }