コード例 #1
0
ファイル: Page02.cs プロジェクト: JaThePlayer/FrostHelper
        public override IEnumerator Routine()
        {
            string[] text = Presentation.GetCleanDialog("PAGE2_TITLE").Split(new char[]
            {
                '|'
            });
            Vector2 pos = new Vector2(128f, 128f);
            int     num;

            for (int i = 0; i < text.Length; i = num + 1)
            {
                TitleText item = new TitleText(pos, text[i]);
                title.Add(item);
                yield return(item.Stamp());

                pos.X += item.Width + ActiveFont.Measure(' ').X * 1.5f;
                item   = null;
                num    = i;
            }
            text = null;
            pos  = default;
            yield return(PressButton());

            list = FancyText.Parse(Presentation.GetDialog("PAGE2_LIST"), Width, 32, 1f, new Color?(Color.Black * 0.7f), null);
            float delay = 0f;

            while (listIndex < list.Nodes.Count)
            {
                if (list.Nodes[listIndex] is FancyText.NewLine)
                {
                    yield return(PressButton());
                }
                else
                {
                    delay += 0.008f;
                    if (delay >= 0.016f)
                    {
                        delay -= 0.016f;
                        yield return(0.016f);
                    }
                }
                listIndex++;
            }
            yield return(PressButton());

            Audio.Play("event:/new_content/game/10_farewell/ppt_impossible");
            while (impossibleEase < 1f)
            {
                impossibleEase = Calc.Approach(impossibleEase, 1f, Engine.DeltaTime);
                yield return(null);
            }
            yield break;
        }