public bool CompareParameter(BehaviorParameter parameter) { BehaviorParameter cacheParameter = null; if (!_allParameterDic.TryGetValue(parameter.parameterName, out cacheParameter)) { return(false); } if (cacheParameter.parameterType != parameter.parameterType) { Debug.LogError("parameter Type not Equal:" + cacheParameter.parameterName + " " + cacheParameter.parameterType + " " + parameter.parameterType); return(false); } return(parameter.Compare(cacheParameter)); }
public bool CompareParameter(BehaviorParameter parameter) { BehaviorParameter environmentParameter = null; if (!_environmentParameterDic.TryGetValue(parameter.parameterName, out environmentParameter)) { return(false); } if (environmentParameter.parameterType != parameter.parameterType) { Debug.LogError("parameter Type not Equal:" + environmentParameter.parameterName + " " + environmentParameter.parameterType + " " + parameter.parameterType); return(false); } BehaviorCompare behaviorCompare = environmentParameter.Compare(parameter); int value = (parameter.compare) & (int)behaviorCompare; return(value > 0); }