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


C# Action.End方法代码示例

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


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

示例1: EndAction

        private void EndAction(Action action)
        {
            action.isRunning = false;

            ActionEnd actionEnd = action.End (this.actions);
            if (isSkipping && action.lastResult.skipAction != -10 && (action is ActionCheck || action is ActionCheckMultiple))
            {
                // When skipping an ActionCheck that has already run, revert to previous result
                actionEnd = new ActionEnd (action.lastResult);
            }
            else
            {
                action.SetLastResult (new ActionEnd (actionEnd));
                ReturnLastResultToSource (actionEnd, actions.IndexOf (action));
            }

            if (action is ActionCheck || action is ActionCheckMultiple)
            {
                if (actionEnd.resultAction == ResultAction.Skip && actionEnd.skipAction == actions.IndexOf (action))
                {
                    // Looping on itself will cause a StackOverflowException, so delay slightly
                    ProcessActionEnd (actionEnd, actions.IndexOf (action), true);
                    return;
                }
            }

            ProcessActionEnd (actionEnd, actions.IndexOf (action));
        }
开发者ID:mcbodge,项目名称:eidolon,代码行数:28,代码来源:ActionList.cs

示例2: EndAction

		private void EndAction (Action action)
		{
			action.isRunning = false;
			
			int actionEnd = 0;
			if (isSkipping && action.lastResult != -10 && (action is ActionCheck || action is ActionCheckMultiple))
			{
				// When skipping an ActionCheck that has already run, revert to previous result
				actionEnd = action.lastResult;
			}
			else
			{
				actionEnd = action.End (this.actions);
				action.lastResult = actionEnd;
			}
			if (actionEnd >= 0)
			{
				nextActionNumber = actionEnd;
			}
			
			if (action.endAction == ResultAction.RunCutscene)
			{
				if (action.isAssetFile && action.linkedAsset != null)
				{
					AdvGame.RunActionListAsset (action.linkedAsset);
				}
				else if (!action.isAssetFile && action.linkedCutscene != null && action.linkedCutscene != this)
				{
					action.linkedCutscene.SendMessage ("Interact");
				}
			}
			if (actionEnd == -1 || actionEnd == -2)
			{
				EndCutscene ();
			}
			else if (nextActionNumber >= 0)
			{
				ProcessAction (nextActionNumber);
			}
			
			if (action.endAction == ResultAction.RunCutscene && !action.isAssetFile && action.linkedCutscene != null && action.linkedCutscene == this)
			{
				action.linkedCutscene.SendMessage ("Interact");
			}
		}
开发者ID:amutnick,项目名称:CrackTheCode_Repo,代码行数:45,代码来源:ActionList.cs


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