Exemple #1
0
        public void InitPlayerAngeredCat()
        {
            StoryNode acceptApology = new StoryNode("Ok whatever.", () =>
            {
                container.storyRoot = root; //cat's okay now, so make the root the generic root.
                container.View.UpdateImage(catImages[ZERO]);
            });

            playerAngeredCat.AddHint(new StoryNode("I'd accept an apology."));

            playerAngeredCat.AddInputBasedTransition("(sorry|i didn't mean it|i apologize|forgive me)".MatchSomewhere(), acceptApology);
            acceptApology.TakeEntireSubgraphOf(root);
        }
Exemple #2
0
 /*
  *  graft in an intermediary step that the player can trigger via entering anything.
  *
  * */
 public void GraftStep(StoryNode step)
 {
     step.TakeEntireSubgraphOf(this);
     this.AddFreeTransition(step);
 }
Exemple #3
0
    /*
     * a recent replacement for loop back to this via... the idea is that I don't think it makes much sense to loop back to the exact same text.
     * what we want to loop back to is a node with different text then the original, but the same subgraph. so instead of looping back to the original node
     * we loop back to a new node which is basically a graft.
     *
     * */

    public void GraftLoop(StoryNode intermediary, StoryNode loopTo)
    {
        loopTo.TakeEntireSubgraphOf(this);
        intermediary.AddFreeTransition(loopTo);
        AddFreeTransition(intermediary);
    }
Exemple #4
0
 /*
  * very similar to loopGraft, only the transition to the grafted composite is an input pattern, as opposed to a free transition as
  * is assumed with LoopGraft. Use Graft to create additional steps in a story w/o having to actually build out new subgraphs.
  *
  * note: all "graft" methods establish a persistent directed link between this and param CompositeStory. the param CompositeStory will
  * get all hints/input based transitions/flavor texts that are cureently saved to this and all future ones, but this won't get the hints/flavor texts/etc that are
  * added to the grafted in story
  * */
 public void GraftStep(string viaInput, StoryNode step)
 {
     step.TakeEntireSubgraphOf(this);
     this.AddInputBasedTransition(viaInput, step);
 }