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));
                }
            }
        }
Exemple #3
0
        /**
         * <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);
                 * }*/
            }
        }
Exemple #4
0
        /**
         * <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);
                }
            }
        }
Exemple #5
0
        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;
            }
        }