示例#1
0
 private Process GetTalkProcess(Talk talk, Action postTalk)
 {
     return(new Process(
                talk.Name,
                Util.GetSprite("talk"),
                string.Format("Talk about this topic.", talk.Name),
                () => {
         ActUtil.SetupScene(
             ActUtil.LongTalk(
                 Get(ROOT_INDEX),
                 shopkeeper,
                 talk.Big
                 ),
             () => talk.SetFlags(flags),
             () => postTalk()
             );
     },
                () => talk.Condition(flags)
                ).SetVisibleOnDisable(false));
 }
示例#2
0
        private void DebugPage()
        {
            Page debug     = Get(DEBUGGING);
            Grid submenu   = new Grid("Go to submenu");
            Grid mainDebug = new Grid("Return to main menu");

            Character kitsune = CharacterList.TestEnemy();

            debug.AddCharacters(Side.LEFT, kitsune);
            int level = 0;

            mainDebug.List = new IButtonable[] {
                Get(ROOT_INDEX),
                new Process("Say", "Hello", () => Presenter.Main.Instance.TextBoxes.AddTextBox(new Model.TextBoxes.TextBox("Hello"))),
                new Process("AttDisb", () => Presenter.Main.Instance.TextBoxes.AddTextBox(new Model.TextBoxes.TextBox(kitsune.Stats.LongAttributeDistribution))),
                new Battle(debug, debug, Music.BOSS, "Battle Test", new Character[] { CharacterList.Hero("Debug"), CharacterList.TestEnemy(), CharacterList.TestEnemy() }, new Character[] { CharacterList.TestEnemy(), CharacterList.TestEnemy() }),
                new Process("LongTalk Test", () => {
                    ActUtil.SetupScene(ActUtil.LongTalk(debug, kitsune, "<t>we have the best <b>guns</b><s>theaefaefef oieafoewjfoejfio oe foiawjefoawijef oj efjoiejfaoo oajeoaijfo wi best guns<a>the best gonzos the best gonzos the best gonzosthe best gonzos the best gonzos the best gonzos the best gonzos the best gonzos the best gonzos the best gonzos the best gonzos the best gonzos the best gonzos the best gonzos the best gonzos the best gonzos<a>helloworld<t>this is the captian speak"));
                }),
                new Process("Get level exp diff", () => {
                    Page.TypeText(new TextBox(string.Format("For level {0}-{1}: {2} exp", level, level + 1, Experience.GetExpDiffForLevel(level, level + 1))));
                    level++;
                }),
                new Process("ALL saves", () => SaveLoad.PrintSaves()),
                new Process("DELET all saves", () => SaveLoad.DeleteAllSaves()),
                new Process("move fox", () => { debug.Left.Clear(); debug.AddCharacters(Side.RIGHT, kitsune); }),
                new Process("test boss logo", () => ActUtil.SetupScene(new BossTransitionAct(Root, kitsune.Look))),
                new Process("test trophy", () => GameJolt.API.Trophies.Unlock(80273)),
                submenu
            };

            submenu.List = new IButtonable[] {
                new Process("Say hello", () => Presenter.Main.Instance.TextBoxes.AddTextBox(new Model.TextBoxes.TextBox("Hello"))),
                mainDebug
            };

            debug.AddCharacters(Side.LEFT, kitsune);
            debug.Actions = mainDebug.List;
        }