示例#1
0
    public override void _Process(float delta)
    {
        // If the time is running, we want to wait
        if (timer.TimeLeft > 0)
        {
            return;
        }

        // Check if we have anything to consume
        if (story.CanContinue)
        {
            string text = story.Continue().Trim();
            if (text.Length > 0)
            {
                container.Add(container.CreateText(text));
            }

            // Maybe we have choices now that we moved on?
            if (story.HasChoices)
            {
                container.Add(container.CreateSeparation(), 0.2f);
                // Add a button for each choice
                for (int i = 0; i < story.CurrentChoices.Length; ++i)
                {
                    container.Add(container.CreateChoice(story.CurrentChoices[i], i), 0.4f);
                }
            }
            timer.Start();
        }
        else if (!story.HasChoices)
        {
            container.Add(container.CreateSeparation(), 0.4f);
            container.Add(container.CreateSeparation(), 0.5f);
            container.Add(container.CreateSeparation(), 0.6f);
            SetProcess(false);
        }
    }
示例#2
0
 public void OnStoryInkEnded()
 {
     container.Add(container.CreateSeparation(), 0.4f);
     container.Add(container.CreateSeparation(), 0.5f);
     container.Add(container.CreateSeparation(), 0.6f);
 }