示例#1
0
    private void BeginStoryIfValid()
    {
        List <StoryPage> storyPages = _stateMachine.CurrentStoryEvent.StoryPages.ToList();

        if (storyPages.Count > 0 && storyPages != null)
        {
            // begin story
            _isValidStory = true;
            _pageController.Begin(storyPages);
        }
        else
        {
            _isValidStory = false;
        }
    }
示例#2
0
    private void BeginStoryIfValid()
    {
        List <StoryPage> storyPages = _stateMachine.CurrentChoiceOutcome.ChosenStoryPages.ToList();

        if (StoryHelper.IsStoryPagesValid(storyPages))
        {
            _isValidStory = true;
            //_stateMachine.SetStoryPages(storyPages);
            _pageController.Begin(storyPages);
        }
        // otherwise it's an invalid story
        else
        {
            Debug.LogError("No Valid story assigned");
            _isValidStory = false;
        }
    }