本文整理汇总了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));
}
示例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");
}
}