예제 #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();
        }
예제 #2
0
 public void fadeIn(NPC npc)
 {
     fadingIn = true;
     fadeCounter = 0;
     talkingNPC = npc;
     npc.getFirstChatPage().parseString();
     npc.getFirstChatPage().setOptionIndex(0);
     npc.setCurrentChatPage(npc.getFirstChatPage());
 }