当前位置: 首页>>代码示例>>C#>>正文


C# CLS_Content.Get方法代码示例

本文整理汇总了C#中CSLE.CLS_Content.Get方法的典型用法代码示例。如果您正苦于以下问题:C# CLS_Content.Get方法的具体用法?C# CLS_Content.Get怎么用?C# CLS_Content.Get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CSLE.CLS_Content的用法示例。


在下文中一共展示了CLS_Content.Get方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ComputeValue

        public CLS_Content.Value ComputeValue(CLS_Content content)
        {
            content.InStack(this);

            CLS_Content.Value left = content.Get(value_name);
            ICLS_Type type = content.environment.GetType(left.type);
            CLType returntype;
            left.value = type.Math2Value(content, mathop, left.value, CLS_Content.Value.One, out returntype);
            //left.value = type.ConvertTo(content, left.value, v.type);
            //content.Set(value_name, left.value);

            content.OutStack(this);

            return content.Get(value_name);
        }
开发者ID:wpszz,项目名称:CSLightForUnity,代码行数:15,代码来源:CLS_Expression_SelfOp.cs

示例2: ComputeValue

        public CLS_Content.Value ComputeValue(CLS_Content content)
        {
            content.InStack(this);

            var v = content.Get(value_name);
            ICLS_Type type = content.environment.GetType(v.type);
            CLType returntype;
            object value = type.Math2Value(content,mathop, v.value, CLS_Content.Value.One, out returntype);
            value = type.ConvertTo(content, value, v.type);
            content.Set(value_name, value);

            //操作变量之
            //做数学计算
            //从上下文取值
            //_value = null;
            content.OutStack(this);

            return content.Get(value_name);
        }
开发者ID:GraphicGame,项目名称:CSLightStudio,代码行数:19,代码来源:CLS_Expression_SelfOp.cs

示例3: ComputeValue

        public CLS_Content.Value ComputeValue(CLS_Content content)
        {
            content.InStack(this);
            var value=content.Get(value_name);
            content.OutStack(this);

            //从上下文取值

            return value;
        }
开发者ID:GraphicGame,项目名称:CSLightStudio,代码行数:10,代码来源:CLS_Expression_GetValue.cs

示例4: MemberCall

        public override CLS_Content.Value MemberCall(CLS_Content content, object object_this, string function, BetterList<CLS_Content.Value> _params, bool isBaseCall = false)
        {
            CLS_Content.Value retVal = null;

            Mathf newVal = (Mathf)object_this;
            if (function == "Equals")
            {
                retVal = new CLS_Content.Value();
                retVal.type = typeof(bool);
                retVal.value = newVal.Equals(_params[0].value);
            }
            else if (function == "ToString")
            {
                retVal = new CLS_Content.Value();
                retVal.type = typeof(string);
                retVal.value = newVal.ToString();
            }
            else
                return base.MemberCall(content, object_this, function, _params, isBaseCall);
            ICLS_Expression expLeft = content.CallExpression.listParam[0];
            CLS_Expression_GetValue expGetValue = expLeft as CLS_Expression_GetValue;
            if (expGetValue != null)
            {
                content.Set(expGetValue.value_name, newVal);
                return retVal;
            }
            CLS_Expression_MemberFind expMemberFind = expLeft as CLS_Expression_MemberFind;
            if (expMemberFind != null)
            {
                expGetValue = expMemberFind.listParam[0] as CLS_Expression_GetValue;
                CLS_Content.Value val = content.Get(expGetValue.value_name);
                content.environment.GetType(val.type).function.MemberValueSet(content, val.value, expMemberFind.membername, newVal);
                return retVal;
            }

            return base.MemberCall(content, object_this, function, _params, isBaseCall);
        }
开发者ID:wpszz,项目名称:CSLightForUnity,代码行数:37,代码来源:ToCSLightMathf.cs

示例5: ComputeValue

 public CLS_Content.Value ComputeValue(CLS_Content content)
 {
     return content.Get(value_name);
 }
开发者ID:wpszz,项目名称:CSLightForUnity,代码行数:4,代码来源:CLS_Expression_GetValue.cs

示例6: MemberValueSet

        public override void MemberValueSet(CLS_Content content, object object_this, string valuename, object value, bool isBaseCall = false)
        {
            Color newVal = (Color)object_this;
            if (valuename == "a")
                newVal.a = Convert.ToSingle(value);
            else if (valuename == "b")
                newVal.b = Convert.ToSingle(value);
            else if (valuename == "g")
                newVal.g = Convert.ToSingle(value);
            else if (valuename == "r")
                newVal.r = Convert.ToSingle(value);
            else
                base.MemberValueSet(content, object_this, valuename, value, isBaseCall);
            ICLS_Expression expLeft = content.CallExpression.listParam[0];
            CLS_Expression_GetValue expGetValue = expLeft as CLS_Expression_GetValue;
            if (expGetValue != null)
            {
                content.Set(expGetValue.value_name, newVal);
                return;
            }
            CLS_Expression_MemberFind expMemberFind = expLeft as CLS_Expression_MemberFind;
            if (expMemberFind != null)
            {
                expGetValue = expMemberFind.listParam[0] as CLS_Expression_GetValue;
                if (content.CallExpression is CLS_Expression_SelfOpWithValue)
                {
                    content.Set(expGetValue.value_name, newVal);
                    return;
                }
                CLS_Content.Value val = content.Get(expGetValue.value_name);
                content.environment.GetType(val.type).function.MemberValueSet(content, val.value, expMemberFind.membername, newVal);
                return;
            }

            base.MemberValueSet(content, object_this, valuename, value, isBaseCall);
        }
开发者ID:wpszz,项目名称:CSLightForUnity,代码行数:36,代码来源:ToCSLightColor.cs

示例7: MemberCall

        public override CLS_Content.Value MemberCall(CLS_Content content, object object_this, string function, BetterList<CLS_Content.Value> _params, bool isBaseCall = false)
        {
            CLS_Content.Value retVal = null;

            Vector3 newVal = (Vector3)object_this;
            if (function == "Equals")
            {
                retVal = new CLS_Content.Value();
                retVal.type = typeof(bool);
                retVal.value = newVal.Equals(_params[0].value);
            }
            else if (function == "Normalize")
            {
                newVal.Normalize();
                retVal = CLS_Content.Value.Void;
            }
            else if (function == "Scale")
            {
                newVal.Scale(((Vector3)_params[0].value));
                retVal = CLS_Content.Value.Void;
            }
            else if (function == "Set")
            {
                newVal.Set(Convert.ToSingle(_params[0].value), Convert.ToSingle(_params[1].value), Convert.ToSingle(_params[2].value));
                retVal = CLS_Content.Value.Void;
            }
            else if (function == "ToString")
            {
                if (_params.size == 0)
                {
                    retVal = new CLS_Content.Value();
                    retVal.type = typeof(string);
                    retVal.value = newVal.ToString();
                }
                else if (_params.size == 1)
                {
                    retVal = new CLS_Content.Value();
                    retVal.type = typeof(string);
                    retVal.value = newVal.ToString(((string)_params[0].value));
                }
            }
            else
                return base.MemberCall(content, object_this, function, _params, isBaseCall);
            ICLS_Expression expLeft = content.CallExpression.listParam[0];
            CLS_Expression_GetValue expGetValue = expLeft as CLS_Expression_GetValue;
            if (expGetValue != null)
            {
                content.Set(expGetValue.value_name, newVal);
                return retVal;
            }
            CLS_Expression_MemberFind expMemberFind = expLeft as CLS_Expression_MemberFind;
            if (expMemberFind != null)
            {
                expGetValue = expMemberFind.listParam[0] as CLS_Expression_GetValue;
                CLS_Content.Value val = content.Get(expGetValue.value_name);
                content.environment.GetType(val.type).function.MemberValueSet(content, val.value, expMemberFind.membername, newVal);
                return retVal;
            }

            return base.MemberCall(content, object_this, function, _params, isBaseCall);
        }
开发者ID:wpszz,项目名称:CSLightForUnity,代码行数:61,代码来源:ToCSLightVector3.cs

示例8: ComputeValue

        public CLS_Content.Value ComputeValue(CLS_Content content)
        {
            content.InStack(this);
            BetterList<CLS_Content.Value> _params = CLS_Content.NewParamList();
            for (int i = 0, count = listParam.Count; i < count; i++)
            {
                _params.Add(listParam[i].ComputeValue(content));
            }

            CLS_Content.Value retVal;
            SType.Function fun;

            if (content.CallType != null && content.CallType.functions.TryGetValue(funcname, out fun))
            {
                if (fun.bStatic)
                {
                    retVal = content.CallType.StaticCall(content, funcname, _params);
                }
                else
                {
                    retVal = content.CallType.MemberCall(content, content.CallThis, funcname, _params);
                }
            }
            else
            {
                retVal = content.Get(funcname);
                Delegate sysDele = retVal.value as Delegate;
                if (sysDele != null)
                {
                    object[] args = CLS_Content.ParamObjsArray[_params.size];
                    for (int i = 0; i < _params.size; i++)
                    {
                        args[i] = _params[i].value;
                    }
                    retVal = new CLS_Content.Value();
                    retVal.value = sysDele.DynamicInvoke(args);
                    if (retVal.value != null)
                        retVal.type = retVal.value.GetType();
                }
                else
                {
                    DeleFunction csleDele = retVal.value as DeleFunction;
                    if (csleDele.callthis != null)
                    {
                        retVal = csleDele.calltype.MemberCall(content, csleDele.callthis, csleDele.function, _params);
                    }
                    else
                    {
                        retVal = csleDele.calltype.StaticCall(content, csleDele.function, _params);
                    }
                }
            }
            CLS_Content.PoolParamList(_params);
            content.OutStack(this);
            return retVal;
        }
开发者ID:wpszz,项目名称:CSLightForUnity,代码行数:56,代码来源:CLS_Expression_Function.cs

示例9: MemberValueSet

        public override void MemberValueSet(CLS_Content content, object object_this, string valuename, object value, bool isBaseCall = false)
        {
            Quaternion newVal = (Quaternion)object_this;
            if (valuename == "eulerAngles")
                newVal.eulerAngles = ((Vector3)value);
            else if (valuename == "w")
                newVal.w = Convert.ToSingle(value);
            else if (valuename == "x")
                newVal.x = Convert.ToSingle(value);
            else if (valuename == "y")
                newVal.y = Convert.ToSingle(value);
            else if (valuename == "z")
                newVal.z = Convert.ToSingle(value);
            else
                base.MemberValueSet(content, object_this, valuename, value, isBaseCall);
            ICLS_Expression expLeft = content.CallExpression.listParam[0];
            CLS_Expression_GetValue expGetValue = expLeft as CLS_Expression_GetValue;
            if (expGetValue != null)
            {
                content.Set(expGetValue.value_name, newVal);
                return;
            }
            CLS_Expression_MemberFind expMemberFind = expLeft as CLS_Expression_MemberFind;
            if (expMemberFind != null)
            {
                expGetValue = expMemberFind.listParam[0] as CLS_Expression_GetValue;
                if (content.CallExpression is CLS_Expression_SelfOpWithValue)
                {
                    content.Set(expGetValue.value_name, newVal);
                    return;
                }
                CLS_Content.Value val = content.Get(expGetValue.value_name);
                content.environment.GetType(val.type).function.MemberValueSet(content, val.value, expMemberFind.membername, newVal);
                return;
            }

            base.MemberValueSet(content, object_this, valuename, value, isBaseCall);
        }
开发者ID:wpszz,项目名称:CSLightForUnity,代码行数:38,代码来源:ToCSLightQuaternion.cs


注:本文中的CSLE.CLS_Content.Get方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。