Beispiel #1
0
        public DialogLoader(int fontsize, REMOPoint Name_Pos, REMOPoint Dialog_Pos, Color StringColor, Color BackgroundColor)
        {
            ScriptReader.AddRule("CG", (s) =>
            {
                CGPipeline[s].Draw();
            });
            ScriptReader.AddRule("n", (s) => { StandAlone.DrawString(fontsize, "KoreanFont", s, Name_Pos, StringColor); });
            ScriptReader.AddRule("s", (s) => {
                s = s.Replace("@", "\n");
                if (currentString.Length < s.Length && StandAlone.FrameTimer % 4 == 0)
                {
                    currentString = s.Substring(0, currentString.Length + 1);
                }
                StandAlone.DrawString(fontsize, "KoreanFont", currentString, Dialog_Pos, StringColor);
            });

            scn = new Scene(() =>
            {
                line = 0;
            }, () =>
            {
                if (User.JustPressed(Keys.Z) || User.JustPressed(Keys.Space) || User.JustLeftClicked())
                {
                    string currentScript = ScriptReader.ParseLine("s", Scripts[line]);
                    currentScript        = currentScript.Replace("@", "\n");
                    if (currentString.Length == currentScript.Length)
                    {
                        line++;                     //다음 라인으로 넘어갑니다.
                        currentString = "";
                        if (line == Scripts.Length) //스크립트를 다 읽었을 경우, 지정해둔 액션으로 넘어갑니다.
                        {
                            Projectors.Projector.Unload(scn);
                            AfterAction();
                        }
                    }
                    else
                    {
                        currentString = currentScript;
                    }
                }
            }, () =>
            {
                Filter.Absolute(StandAlone.FullScreen, BackgroundColor);
                ScriptReader.ReadLine(Scripts[line]);
                Cursor.Draw(Color.White);
            });
        }
Beispiel #2
0
 public CustomTLReader() : base()
 {
     this.Embracer = "[]";
     this.AddRule("Script", (s) => { StandAlone.DrawString(s, new Point(100, 200), Color.White); });
 }
Beispiel #3
0
 public void Draw(Color c)
 {
     StandAlone.DrawString(FuncCallCount + " Loop,Time = " + StandAlone.ElapsedMillisec + "ms (per 1frame)", REMOPoint.Zero, c);
 }