示例#1
0
    public StoryDataSO GetRandomViableStory()
    {
        Debug.Log("StoryEventLibrary.GetRandomViableStory() called...");

        StoryDataSO storyReturned = null;
        storyReturned = viableStories[Random.Range(0, viableStories.Count)];

        if (storyReturned)
        {
            Debug.Log("StoryEventLibrary.GetRandomViableStory() randomly chose story event: " + storyReturned.storyName);
        }
        else
        {
            Debug.Log("StoryEventLibrary.GetRandomViableStory() could not find a random viable story event, returning null...");
        }

        return storyReturned;

    }
示例#2
0
    // General Logic
    #region
    public void BuildFromStoryEventData(StoryDataSO storyData)
    {
        Debug.Log("StoryEventController.BuildFromStoryEventData() called, building event: " + storyData.storyName);

        // cache data
        currentStoryData = storyData;

        // set description text
        SetEventDescriptionText(storyData.storyInitialDescription);

        // set name text
        SetStoryNameText(storyData.storyName);

        // set event image
        SetStoryImage(storyData.storyInitialSprite);

        // Load first page buttons
        BuildAllChoiceButtonsFromStoryPage(storyData.storyPages[0].pageChoices);
        SetCurrentStoryPage(storyData.storyPages[0]);
    }