Beispiel #1
0
        private void addNPCS()
        {
            NPC testNpc = new NPC("TEST", this, new Vector2(3, 6), 1, new Vector2(30, 30), new Vector2(30, 50), 0);

            ChatPage page1 = new ChatPage();
            ChatPage page2 = new ChatPage();
            ChatPage page3 = new ChatPage();

            page1.setText(@"This is the test long string that will be parsed into small strings and individually drawn based on the text speed and such. " +
                "These next couple sentences are to test having a string that is longer than 9 lines. Blah blah blah blah poop poop poop fart fart fart fart fart I don't" +
                " if this is long enough. Guess not I will add a couple more things to make it longer. Still not long enough here are a couple more useless words");

            page1.addDestination("Yes", page2);
            page1.addDestination("No", page2);
            page1.addDestination("Test 2 line option that should be really long and take up at least 2 lines?", page2);
            page1.addDestination("Exit", page3);

            page2.setText(@"Test page 2");
            page2.addDestination("Exit", page3);
            testNpc.setExitPage(page3);
            testNpc.addChatPage(page1);
            testNpc.addChatPage(page2);
            testNpc.addChatPage(page3);

            testNpc.setFirstChatPage(page1);
            testNpc.setCurrentChatPage(page1);

            npcList.Add(testNpc);
            FreeTile ft = (FreeTile) zoneTileMap.getTile(6, 3, 1);
            ft.insertNPC();
        }
Beispiel #2
0
        public void addDestination(string option, ChatPage destination)
        {
            int index = parsedOptions.Count;
            opt = true;
            options.Add(option);
            parsedOptions.Add(new List<string>());
            lastIndex = 0;
            for (int i = 0; i < option.Length; i++)
            {
                if (i == option.Length - 1 || option[i] == ' ')
                {
                    parsedOptions[index].Add(option.Substring(lastIndex, i - lastIndex + 1));
                    lastIndex = i + 1;
                }

            }
            pageDestinations.Add(option, destination);
        }
Beispiel #3
0
 public void addChatPage(ChatPage page)
 {
     chatPages.Add(page);
 }
Beispiel #4
0
 public void setFirstChatPage(ChatPage page)
 {
     firstChatPage = page;
 }
Beispiel #5
0
 public void setExitPage(ChatPage page)
 {
     exitPage = page;
 }
Beispiel #6
0
 public void setCurrentChatPage(ChatPage page)
 {
     currentChatPage = page;
 }