public CQ_Content.Value ComputeValue(CQ_Content content) { content.InStack(this); if (_listParam != null && _listParam.Count > 0) { CQ_Content.Value v = _listParam[0].ComputeValue(content); object val = v.value; if ((Type)value_type == typeof(CQ_Type_Var.var)) { if (v.type != null) { value_type = v.type; } } else if (v.type != value_type) { val = content.environment.GetType(v.type).ConvertTo(content, v.value, value_type); } content.DefineAndSet(value_name, value_type, val); } else { content.Define(value_name, value_type); } //设置环境变量为 content.OutStack(this); return(null); }
public CQ_Value ComputeValue(CQ_Content content) { #if CQUARK_DEBUG content.InStack(this); #endif if (__expressions != null && __expressions.Count > 0) { CQ_Value v = __expressions[0].ComputeValue(content); object val = v.value; if ((Type)value_type == typeof(Type_Var.var)) { if (v.type != null) { value_type = v.type; } } else if (v.type != value_type) { val = v.ConvertTo(value_type); } content.DefineAndSet(value_name, value_type, val); } else { content.Define(value_name, value_type); } #if CQUARK_DEBUG content.OutStack(this); #endif return(null); }
public CQ_Value ComputeValue(CQ_Content content) { #if CQUARK_DEBUG content.InStack(this); #endif if (__expressions != null && __expressions.Count > 0) { CQ_Value v = __expressions[0].ComputeValue(content); //object val = v.GetValue(); //if((Type)value_type == typeof(Type_Var.var)) { // if(!v.TypeIsEmpty) // value_type = v.typeBridge; //} //else if(v.typeBridge != value_type) { // val = v.ConvertTo(value_type); //} content.DefineAndSet(value_name, value_type, v); } else { content.Define(value_name, value_type); } #if CQUARK_DEBUG content.OutStack(this); #endif return(CQ_Value.Null); }
public IEnumerator CoroutineCompute(CQ_Content content, ICoroutine coroutine) { #if CQUARK_DEBUG content.InStack(this); #endif if (__expressions != null && __expressions.Count > 0) { if (__expressions[0].hasCoroutine) { yield return(coroutine.StartNewCoroutine(CoroutineCompute(content, coroutine))); } else { CQ_Value v = __expressions[0].ComputeValue(content); object val = v.value; if ((Type)value_type == typeof(Type_Var.var)) { if (v.type != null) { value_type = v.type; } } else if (v.type != value_type) { val = v.ConvertTo(value_type); } content.DefineAndSet(value_name, value_type, val); } } else { content.Define(value_name, value_type); } #if CQUARK_DEBUG content.OutStack(this); #endif }
public IEnumerator CoroutineCompute(CQ_Content content, ICoroutine coroutine) { content.InStack(this); if (_listParam != null && _listParam.Count > 0) { if (_listParam[0].hasCoroutine) { yield return(coroutine.StartNewCoroutine(CoroutineCompute(content, coroutine))); } else { CQ_Content.Value v = _listParam[0].ComputeValue(content); object val = v.value; if ((Type)value_type == typeof(CQ_Type_Var.var)) { if (v.type != null) { value_type = v.type; } } else if (v.type != value_type) { val = content.environment.GetType(v.type).ConvertTo(content, v.value, value_type); } content.DefineAndSet(value_name, value_type, val); } } else { content.Define(value_name, value_type); } //设置环境变量为 content.OutStack(this); }
public IEnumerator CoroutineCompute(CQ_Content content, UnityEngine.MonoBehaviour coroutine) { #if CQUARK_DEBUG content.InStack(this); #endif if (__expressions != null && __expressions.Count > 0) { if (__expressions[0].hasCoroutine) { yield return(coroutine.StartCoroutine(CoroutineCompute(content, coroutine))); } else { CQ_Value v = __expressions[0].ComputeValue(content); //object val = v.GetValue(); //if((Type)value_type == typeof(Type_Var.var)) { // if(!v.TypeIsEmpty) // value_type = v.typeBridge; //} //else if(v.typeBridge != value_type) { // val = v.ConvertTo(value_type); //} content.DefineAndSet(value_name, value_type, v); } } else { content.Define(value_name, value_type); } #if CQUARK_DEBUG content.OutStack(this); #endif }