Example #1
0
        private ScriptableAction getNextAction()
        {
            ScriptableAction result = null;

            if (interaction != null && currentStepIndex < Track.Steps.Length)
            {
                InteractionDefinition.Track.Step step = Track.Steps[currentStepIndex];
                if (step.SyncPointIndex >= 0)
                {
                    interaction.reachedSyncPoint(step.SyncPointIndex, TrackIndex);
                    result = ((!interaction.isSyncPointReady(step.SyncPointIndex)) ? ScriptableActionPause.Instance : step.Action);
                }
                else
                {
                    result = step.Action;
                }
            }
            return(result);
        }