public CQ_Value ComputeValue(CQ_Content content) { #if CQUARK_DEBUG content.InStack(this); #endif List <CQ_Value> _params = new List <CQ_Value>(); for (int i = 0; i < _expressions.Count; i++) { _params.Add(_expressions[i].ComputeValue(content)); } CQ_Value value = null; //这几行是为了快速获取Unity的静态变量,而不需要反射 if (!Wrap.StaticCall(type.typeBridge.type, functionName, _params, out value)) { if (cache == null || cache.cachefail) { cache = new MethodCache(); value = type._class.StaticCall(content, functionName, _params, cache); } else { value = type._class.StaticCallCache(content, _params, cache); } } #if CQUARK_DEBUG content.OutStack(this); #endif return(value); }
public CQ_Value ComputeValue(CQ_Content content) { #if CQUARK_DEBUG content.InStack(this); #endif CQ_Value[] parameters = CQ_ObjPool.PopArray(_expressions.Count); for (int i = 0; i < _expressions.Count; i++) { parameters[i] = _expressions[i].ComputeValue(content); } CQ_Value value = CQ_Value.Null; //这几行是为了快速获取Unity的静态变量,而不需要反射 if (!Wrap.StaticCall(type.typeBridge.type, functionName, parameters, out value)) { if (cache == null || cache.cachefail) { cache = new MethodCache(); value = type._class.StaticCall(content, functionName, parameters, cache); } else { value = type._class.StaticCallCache(content, parameters, cache); } } #if CQUARK_DEBUG content.OutStack(this); #endif CQ_ObjPool.PushArray(parameters); return(value); }