/** * <summary>Skips the associated ActionList.</summary> */ public void Skip() { if (inSkipQueue) { if (actionListAsset != null) { // Destroy old list, but don't go through ActionListManager's Reset code, to bypass changing GameState etc KickStarter.actionListAssetManager.DestroyAssetList(actionListAsset); actionList = AdvGame.SkipActionListAsset(actionListAsset, startIndex); } else if (actionList != null) { actionList.Skip(startIndex); } /*if (actionList != null) * { * actionList.Skip (startIndex); * } * else if (actionListAsset != null) * { * AdvGame.SkipActionListAsset (actionListAsset, startIndex); * }*/ } }
private void ProcessActionEnd(ActionEnd actionEnd, int i) { if (actionEnd.resultAction == ResultAction.RunCutscene) { if (actionEnd.linkedAsset != null) { if (isSkipping) { AdvGame.SkipActionListAsset(actionEnd.linkedAsset); } else { AdvGame.RunActionListAsset(actionEnd.linkedAsset, 0, !IsSkippable()); } CheckEndCutscene(); } else if (actionEnd.linkedCutscene != null) { if (actionEnd.linkedCutscene != this) { if (isSkipping) { actionEnd.linkedCutscene.Skip(); } else { actionEnd.linkedCutscene.Interact(0, !IsSkippable()); } CheckEndCutscene(); } else { if (triggerTime > 0f) { Kill(); StartCoroutine("PauseUntilStart", !IsSkippable()); } else { ProcessAction(0); } } } } else if (actionEnd.resultAction == ResultAction.Stop) { CheckEndCutscene(); } else if (actionEnd.resultAction == ResultAction.Skip) { ProcessAction(actionEnd.skipAction); } else if (actionEnd.resultAction == ResultAction.Continue) { ProcessAction(i + 1); } }
override public void Skip() { if (listSource == ListSource.InScene && actionList != null) { /*if (actionList.actionListType == ActionListType.RunInBackground) * { * return; * }*/ if (actionList.source == ActionListSource.AssetFile && actionList.assetFile != null && actionList.assetFile.useParameters) { if (actionList.syncParamValues) { SendParameters(actionList.assetFile.parameters, true); } else { SendParameters(actionList.parameters, false); } } else if (actionList.source == ActionListSource.InScene && actionList.useParameters) { SendParameters(actionList.parameters, false); } if (runFromStart) { actionList.Skip(); } else { actionList.Skip(GetSkipIndex(actionList.actions)); } } else if (listSource == ListSource.AssetFile && invActionList != null) { /*if (invActionList.actionListType == ActionListType.RunInBackground) * { * return; * }*/ if (invActionList.useParameters) { SendParameters(invActionList.parameters, true); } if (runFromStart) { AdvGame.SkipActionListAsset(invActionList); } else { AdvGame.SkipActionListAsset(invActionList, GetSkipIndex(invActionList.actions)); } } }
public override void Skip() { if (listSource == ListSource.InScene && actionList != null) { if (actionList.source == ActionListSource.AssetFile && actionList.assetFile != null && actionList.assetFile.useParameters) { if (actionList.syncParamValues) { SendParameters(actionList.assetFile.GetParameters(), true); } else { SendParameters(actionList.parameters, false); } } else if (actionList.source == ActionListSource.InScene && actionList.useParameters) { SendParameters(actionList.parameters, false); } if (runFromStart) { actionList.Skip(); } else { actionList.Skip(GetSkipIndex(actionList.actions)); } } else if (listSource == ListSource.AssetFile && invActionList != null) { if (invActionList.useParameters) { SendParameters(invActionList.GetParameters(), true); } if (runtimeActionList != null && !invActionList.IsSkippable() && invActionList.canRunMultipleInstances) { KickStarter.actionListAssetManager.EndAssetList(runtimeActionList); } if (runFromStart) { AdvGame.SkipActionListAsset(invActionList); } else { AdvGame.SkipActionListAsset(invActionList, GetSkipIndex(invActionList.actions)); } } }
/** * <summary>Skips the associated ActionList.</summary> */ public void Skip() { if (inSkipQueue) { if (actionListAsset != null) { bool isRunningBackup = isRunning; bool inSkipQueueBackup = inSkipQueue; // Destroy old list, but don't go through ActionListManager's Reset code, to bypass changing GameState etc KickStarter.actionListAssetManager.DestroyAssetList(actionListAsset); // Revert to backup so CanResetSkipVars returns correct value after destroying list isRunning = isRunningBackup; inSkipQueue = inSkipQueueBackup; actionList = AdvGame.SkipActionListAsset(actionListAsset, startIndex, conversationOnEnd); } else if (actionList != null) { actionList.Skip(startIndex); } } }
private void ProcessActionEnd(ActionEnd actionEnd, int i, bool doStackOverflowDelay = false) { if (isSkipping && skipIteractions > (actions.Count * 3)) { // StackOverFlow ACDebug.LogWarning("Looping ActionList '" + gameObject.name + "' detected while skipping - ending prematurely to avoid a StackOverflow exception."); CheckEndCutscene(); return; } if (pauseWhenActionFinishes) { resumeIndices.Add(i); if (!AreActionsRunning()) { FinishPause(); } return; } if (actionEnd.resultAction == ResultAction.RunCutscene) { if (actionEnd.linkedAsset != null) { if (isSkipping) { AdvGame.SkipActionListAsset(actionEnd.linkedAsset); } else { AdvGame.RunActionListAsset(actionEnd.linkedAsset, 0, !IsSkippable()); } CheckEndCutscene(); } else if (actionEnd.linkedCutscene != null) { if (actionEnd.linkedCutscene != this) { if (isSkipping) { actionEnd.linkedCutscene.Skip(); } else { actionEnd.linkedCutscene.Interact(0, !IsSkippable()); } CheckEndCutscene(); } else { if (triggerTime > 0f) { Kill(); StartCoroutine("PauseUntilStart", !IsSkippable()); } else { ProcessAction(0); } } } else { CheckEndCutscene(); } } else if (actionEnd.resultAction == ResultAction.Stop) { CheckEndCutscene(); } else if (actionEnd.resultAction == ResultAction.Skip) { if (doStackOverflowDelay) { StartCoroutine(DelayProcessAction(actionEnd.skipAction)); } else { ProcessAction(actionEnd.skipAction); } } else if (actionEnd.resultAction == ResultAction.Continue) { ProcessAction(i + 1); } pauseWhenActionFinishes = false; }
private void RunActionLists() { switch (actionListSource) { case ActionListSource.InScene: if (actionList != null) { if (setParameters) { AssignParameterValues(actionList); } if (actionList.IsSkippable() && runInstantly) { actionList.Skip(); } else { actionList.Interact(); } } break; case ActionListSource.AssetFile: if (actionListAsset != null) { if (setParameters && runMultipleTimes) { if (actionListAsset.canRunMultipleInstances) { for (int i = 0; i < successiveGUIData.Length + 1; i++) { AssignParameterValues(actionListAsset, i); if (actionListAsset.IsSkippable() && runInstantly) { AdvGame.SkipActionListAsset(actionListAsset); } else { actionListAsset.Interact(); } } } else { ACDebug.LogWarning("Cannot set run multiple parameter configurations because the ActionList asset '" + actionListAsset + "' has 'Can run multiple instances?' unchecked.", actionListAsset); } return; } if (setParameters) { AssignParameterValues(actionListAsset); } if (actionListAsset.IsSkippable() && runInstantly) { AdvGame.SkipActionListAsset(actionListAsset); } else { actionListAsset.Interact(); } } break; } }
private void ProcessActionEnd(ActionEnd actionEnd, int i, bool doStackOverflowDelay = false) { if (pauseWhenActionFinishes) { resumeIndices.Add(i); if (!AreActionsRunning()) { FinishPause(); } return; } if (actionEnd.resultAction == ResultAction.RunCutscene) { if (actionEnd.linkedAsset != null) { if (isSkipping) { AdvGame.SkipActionListAsset(actionEnd.linkedAsset); } else { AdvGame.RunActionListAsset(actionEnd.linkedAsset, 0, !IsSkippable()); } CheckEndCutscene(); } else if (actionEnd.linkedCutscene != null) { if (actionEnd.linkedCutscene != this) { if (isSkipping) { actionEnd.linkedCutscene.Skip(); } else { actionEnd.linkedCutscene.Interact(0, !IsSkippable()); } CheckEndCutscene(); } else { if (triggerTime > 0f) { Kill(); StartCoroutine("PauseUntilStart", !IsSkippable()); } else { ProcessAction(0); } } } else { CheckEndCutscene(); } } else if (actionEnd.resultAction == ResultAction.Stop) { CheckEndCutscene(); } else if (actionEnd.resultAction == ResultAction.Skip) { if (doStackOverflowDelay) { StartCoroutine(DelayProcessAction(actionEnd.skipAction)); } else { ProcessAction(actionEnd.skipAction); } } else if (actionEnd.resultAction == ResultAction.Continue) { ProcessAction(i + 1); } pauseWhenActionFinishes = false; }