コード例 #1
0
ファイル: chapter1.cs プロジェクト: rdpeake/CodeRunners
        public Chapter1()
        {
            //opening sequence----------------------------------------------------
            OpeningSequence = new Sequence();

            Episode chapter1OpeningEpisode1 = new Episode(EpisodeTypes.Dialog, "{$dialog.Chapter1OpeningEpisode1}", "ownerbackground", "owner");

            OpeningSequence.interactions.Add(chapter1OpeningEpisode1);

            Episode chapter1OpeningEpisode2 = new Episode(EpisodeTypes.Response | EpisodeTypes.ListResponse, "{$dialog.Chapter1OpeningEpisode2}",
                "ownerbackground", "owner",listResponses: new List<string>() { "Male", "Female" }, variableForResponse: "player.gender");

            OpeningSequence.interactions.Add(chapter1OpeningEpisode2);

            Episode chapter1OpeningEpisode3 = new Episode(EpisodeTypes.Response | EpisodeTypes.BooleanResponse, "{$dialog.Chapter1OpeningEpisode3}",
                "ownerbackground", "owner", dialogOffset: new DialogOffsetDelegate((response) =>
                {
                    if (response == false.ToString())
                        return -1;
                    return 1;
                })
            );

            OpeningSequence.interactions.Add(chapter1OpeningEpisode3);

            Episode chapter1OpeningEpisode4 = new Episode(EpisodeTypes.Response | EpisodeTypes.TextResponse, "{$dialog.Chapter1OpeningEpisode4}",
                "ownerbackground", "owner", variableForResponse: "player.name", defaultTextResponse: "Name");

            OpeningSequence.interactions.Add(chapter1OpeningEpisode4);

            Episode chapter1OpeningEpisode5 = new Episode(EpisodeTypes.Response | EpisodeTypes.BooleanResponse, "{$dialog.Chapter1OpeningEpisode5}",
                    "ownerbackground", "owner", dialogOffset: new DialogOffsetDelegate((response) =>
            {
                if (response == false.ToString())
                    return -1;
                return 1;
            })
            );
            OpeningSequence.interactions.Add(chapter1OpeningEpisode5);

            Episode chapter1OpeningEpisode6 = new Episode(EpisodeTypes.Dialog, "{$Chapter1OpeningEpisode6}",  "ownerbackground", "owner");

            OpeningSequence.interactions.Add(chapter1OpeningEpisode6);

            //Levels-------------------------------------------------------------

            //Closing coditions--------------------------------------------------

            //closing sequence----------------------------------------------------

            //next chapter------------------------------------------------------
            this.NextChapter = () => { return 2; };
        }
コード例 #2
0
ファイル: Chapter.cs プロジェクト: rdpeake/CodeRunners
 //hold section stuff...
 /*
  * a chapter will consist of:
  *      Opening sequence(s)
  *
  *      Level List
  *
  *      Non-locational condition for starting end sequence (otherwise it is built into the level list)
  *
  *      end sequence(s)
  *
  */
 public Chapter()
 {
     OpeningSequence = new Sequence();
 }