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


C# CLS_Content.DumpStack方法代码示例

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


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

示例1: ComputeValue

 public CLS_Content.Value ComputeValue(CLS_Content content)
 {
     CLS_Content.Value srcVal = listParam[0].ComputeValue(content);
     // 不能直接修改srcVal
     CLS_Content.Value val = new CLS_Content.Value();
     val.type = srcVal.type;
     val.value = srcVal.value;
     val.breakBlock = srcVal.breakBlock;
     val.breakBlock += 10;
     #if UNITY_EDITOR
     if (val.value is System.Collections.IEnumerator)
         throw new Exception("Dont support yield return IEnumerator, please use StartCoroutine(IEnumerator) instead: " + content.DumpStack());
     #endif
     return val;
 }
开发者ID:wpszz,项目名称:CSLightForUnity,代码行数:15,代码来源:CLS_Expression_Yield.cs

示例2: CustomCoroutine

        IEnumerator CustomCoroutine(CLS_Content content)
        {
            content.InStack(this);
            content.DepthAdd();
            CLS_Content.Value retVal = null;
            ICLS_Expression exp = null;
            for (int i = 0, count = listParam.Count; i < count; i++)
            {
                exp = listParam[i];
                CLS_Expression_LoopFor expLoopFor = exp as CLS_Expression_LoopFor;
                if (expLoopFor != null)
                {
                    content.InStack(expLoopFor);
                    content.DepthAdd();

                    ICLS_Expression expr_init = expLoopFor.listParam[0];
                    ICLS_Expression expr_continue = expLoopFor.listParam[1];
                    ICLS_Expression expr_step = expLoopFor.listParam[2];
                    ICLS_Expression expr_block = expLoopFor.listParam[3];

            #if UNITY_EDITOR
                    try
                    {
            #endif
                    if (expr_init != null)
                        expr_init.ComputeValue(content);
            #if UNITY_EDITOR
                    }
                    catch (System.Exception ex) { content.environment.logger.Log_Error(ex.Message + "\n" + content.DumpStack() + ex); }
            #endif
                    for (;;)
                    {
            #if UNITY_EDITOR
                        try
                        {
            #endif
                        if (expr_continue != null && !(bool)expr_continue.ComputeValue(content).value)
                            break;
            #if UNITY_EDITOR
                        }
                        catch (System.Exception ex) { content.environment.logger.Log_Error(ex.Message + "\n" + content.DumpStack() + ex); }
            #endif
                        if (expr_block != null)
                        {
                            if (expr_block is CLS_Expression_Block)
                            {
                                content.InStack(expr_block);
                                content.DepthAdd();
                                for (int j = 0, count2 = expr_block.listParam.Count; j < count2; j++)
                                {
            #if UNITY_EDITOR
                                    try
                                    {
            #endif
                                    retVal = expr_block.listParam[j].ComputeValue(content);
            #if UNITY_EDITOR
                                    }
                                    catch (System.Exception ex) { content.environment.logger.Log_Error(ex.Message + "\n" + content.DumpStack() + ex); }
            #endif
                                    if (retVal != null)
                                    {
                                        if (retVal.breakBlock == 12)
                                        {
                                            CLS_Content.PoolContent(content);
                                            yield break;
                                        }
                                        else if (retVal.breakBlock == 13)
                                            yield return retVal.value;
                                        else if (retVal.breakBlock > 1)
                                            break;
                                    }
                                }
                                content.DepthRemove();
                                content.OutStack(expr_block);
                            }
                            else
                            {
            #if UNITY_EDITOR
                                try
                                {
            #endif
                                retVal = expr_block.ComputeValue(content);
            #if UNITY_EDITOR
                                }
                                catch (System.Exception ex) { content.environment.logger.Log_Error(ex.Message + "\n" + content.DumpStack() + ex); }
            #endif
                                if (retVal != null)
                                {
                                    if (retVal.breakBlock == 12)
                                    {
                                        CLS_Content.PoolContent(content);
                                        yield break;
                                    }
                                    else if (retVal.breakBlock == 13)
                                        yield return retVal.value;
                                    else if (retVal.breakBlock > 1)
                                        break;
                                }
                            }
                        }
//.........这里部分代码省略.........
开发者ID:wpszz,项目名称:CSLightForUnity,代码行数:101,代码来源:CLS_Expression_Coroutine.cs


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