Ejemplo n.º 1
0
 private IEnumerator CharacterDialogue(Character speaker, string content)
 {
     if (!string.IsNullOrEmpty(content))
     {
         yield return(ActUtil.SetupSceneRoutine(new Act[] { new TextAct(new AvatarBox(GetSide(speaker), speaker.Look.Sprite, speaker.Look.TextColor, content)) }));
     }
     yield break;
 }
Ejemplo n.º 2
0
 public override Page GetPage(int stageIndex, int areaTotalStageCount, Flags flags, IEnumerable <Character> party, Page camp, Page quests, AreaType type)
 {
     page.OnEnter = () =>
                    ActUtil.SetupScene(
         acts,
         () => OnStageClear(areaTotalStageCount, type, flags, stageIndex),     // Do this first incase if a scene is the last stage area
         () => camp.Invoke());
     return(page);
 }
Ejemplo n.º 3
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));
 }
Ejemplo n.º 4
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;
        }
Ejemplo n.º 5
0
        private void SetupIntro(string name)
        {
            Page      page    = Root;
            Character you     = CharacterList.Hero(name);
            Character partner = CharacterList.Partner("???");

            page.AddCharacters(Side.LEFT, you);
            page.AddCharacters(Side.RIGHT, partner);

            page.OnEnter = () => {
                ActUtil.SetupScene(
                    YourVoice(string.Format("My name is {0}.", name)),
                    PartnerVoice(string.Format("My name is...")),
                    new InputAct("What is their name?", (s) =>
                                 ActUtil.SetupScene(
                                     PartnerVoice("My name is " + s),
                                     new ActionAct(() => partner.Look.Name = s),
                                     new ActionAct(() => GoToCamp(you, partner)
                                                   )
                                     )
                                 )
                    );
            };
        }