Beispiel #1
0
        public override ResultType Execute()
        {
            ResultType resultType = _iCondition.Condition();

            NodeNotify.NotifyExecute(EntityId, NodeId, resultType, Time.realtimeSinceStartup);
            return(resultType);
        }
Beispiel #2
0
 //Checks the OBJECTCONDITION against CONDITION, returns bool
 private bool CheckCondition(IObject objectCondition, int objectConditionOption, ICondition condition, int conditionOption)
 {
     if (objectCondition != null && condition != null)
     {
         return(condition.Condition(objectCondition.Object(status.inSightRange, objectConditionOption), conditionOption));
     }
     else
     {
         return(false);
     }
 }
Beispiel #3
0
        public static List <int> FilterValuesV2(List <int> values, ICondition condObj)
        {
            List <int> filteredValues = new List <int>();

            foreach (int v in values)
            {
                if (condObj.Condition(v))
                {
                    filteredValues.Add(v);
                }
            }

            return(filteredValues);
        }