Esempio n. 1
0
        public void InitSleepingHobby()
        {
            StoryNode mother = new StoryNode("My mother was a nice cat. She was big and fluffy, " +
                                             "not at all like my father. I only saw my father for a moment just seconds after I was old " +
                                             "enough to open my eyes. Male cats don't stick around too long, you see. We're not generally very interested in raising kittens. " +
                                             "Anyway, my mother's name was Diamond.", container.UpdateImageAction(FOUR));

            StoryNode dreams = new StoryNode("I suppose the most interesting dream I've ever had was one where I was a fish. " +
                                             "I was swimming in circles in an aquarium, around a little plastic treasure chest, just like the one in the aquarium over in the living room. " +
                                             "You should look at it sometime. It's very peaceful. In my dream the hand appeared and sprinkled some pellets into the aquarium. " +
                                             "I swam up to eat them, but when I drew close I saw that the pellets were actually eyeballs. Then I woke up.", () => {
                container.View.UpdateImage(catImages[FIVE]);
            });


            hobbiesSleeping.AddInputBasedTransition("(mother|mom)".MatchSomewhere(), mother);
            hobbiesSleeping.AddInputBasedTransition("dream".MatchSomewhere(), dreams);
            hobbiesSleeping.AddHint(new StoryNode("It's no good... you've got me thinking about my mother... and dreams.", container.UpdateImageAction(TEN))
                                    );

            mother.AddInputBasedTransition("dream".MatchSomewhere(), hobbiesSleeping);
            dreams.AddInputBasedTransition("(mother|mom)".MatchSomewhere(), hobbiesSleeping);

            mother.GraftLoop(new StoryNode("Sorry. Bit spaced out. Thinking of my mom does that to me."), new StoryNode(string.Format("<--{0} is thinking about his mother.-->", catName)));
            dreams.GraftLoop(new StoryNode("Dreams are pretty strange. I wonder if other animals have them."), new StoryNode(string.Format("<--{0}'s just staring into space-->", catName)));
        }