예제 #1
0
    private void GenerateAdventure()
    {
        Snippet pre = StoryArc.GetRandomSnippet(SnippetType.Pre);

        if (pre.Need != Need.None)
        {
            NPC.Needs.Add(pre.Need);
            if (pre.Need == Need.Tired)
            {
                NPC.StayDuration = Random.Range(1, GameClock.MaxStayDuration);
            }
        }

        Adventure.Enqueue(pre.Text);

        Snippet main = StoryArc.GetRandomSnippet(SnippetType.Main);

        if (main.Need != Need.None)
        {
            NPC.Needs.Add(main.Need);
            if (main.Need == Need.Tired)
            {
                NPC.StayDuration = Random.Range(1, GameClock.MaxStayDuration);
            }
        }

        Adventure.Enqueue(main.Text);


        Snippet post = StoryArc.GetRandomSnippet(SnippetType.Post);

        if (post.Need != Need.None)
        {
            NPC.Needs.Add(post.Need);
            if (post.Need == Need.Tired)
            {
                NPC.StayDuration = Random.Range(1, GameClock.MaxStayDuration);
            }
        }

        Adventure.Enqueue(post.Text);
    }