public void Dispatch(StoryAction storyAction)
        {
            if (stories == null)
            {
                Debug.LogWarning(DISPATCH_WARNING);
                return;
            }

            stories.Dispatch(storyAction);
        }
Пример #2
0
        private void ApplyActionToStories(StoryAction action, Story story)
        {
            action.ApplyToStory(story);

            if (story.subStories == null)
            {
                return;
            }

            for (var i = 0; i < story.subStories.Length; ++i)
            {
                ApplyActionToStories(action, story.subStories[i]);
            }
        }
Пример #3
0
        private StoryAction DefImpl_Dispatch(StoryAction action)
        {
            // Apply action to stories
            ApplyActionToStories(action, entryStory);

            // Send update to everyone that have mapped their props
            if (mapStoriesToPropsHandlers != null)
            {
                mapStoriesToPropsHandlers(entryStory);
            }

            // Send action forward to listeners
            if (actionListeners != null)
            {
                actionListeners(action);
            }

            action.ReleaseActionForReuse();
            return(action);
        }
        private StoryAction DefImpl_Dispatch(StoryAction action)
        {
            // Apply action to stories
            ApplyActionToStories(action, entryStory);

            // Send update to everyone that have mapped their props
            for (var i = 0; i < mapStoriesToPropsHandlers.Count; ++i)
            {
                mapStoriesToPropsHandlers[i](entryStory);
            }

            // Send action forward to listeners
            for (var i = 0; i < actionListeners.Count; ++i)
            {
                actionListeners[i](action);
            }

            action.ReleaseActionForReuse();
            return(action);
        }