Esempio n. 1
0
    public void setMenuActive(DialogueMenuData dialogueMenuData)
    {
        this.dialogueMenuData = dialogueMenuData;
        menuScrollTopIndex    = 0;
        selectedButtonIndex   = 0;

        updateMenu();
        menuIsSet = true;
        gameObject.SetActive(true);
    }
Esempio n. 2
0
    public void setup()
    {
        //Load and save important data.

        setSavedString(SavePlayerName, "George");

        //Setup Dialogue outputs
        allNpcNames = new string[(int)Subject.MaxValue] {
            "Steve", "Barry", "Megan", "Sandy", "Bruce", "Darol"
        };
        allNpcStartingDialogue = new int[(int)Subject.MaxValue] {
            0, 6,
            getSavedInt(SaveL_foodChoice) == -1 ? 9 : (getSavedInt(SaveL_foodChoice) == 0 ? 20 : 21), // Meg cake choice - change her set speach when scene is loaded based on if/what the previous response was.
            getSavedInt(SaveL_sayHiToCindy) == 0 ? 23 : 2,
            3,
            getSavedInt(SaveL_seeDarolInTwoPlaces) == 0 ? 22 : 7
        };

        const int MaxConvoNum = 24;
        int       convo, sentence;
        int       testSet;

        allSceneDialogue_speech    = new Output[MaxConvoNum][];
        allSceneDialogue_functions = new AfterFunc[MaxConvoNum][];
        allSceneDialogue_menus     = new DialogueMenuData[MaxConvoNum];
        allSceneDialogue_actions   = new DialogueAction[MaxConvoNum];

        convo = 0; sentence = 0;
        allSceneDialogue_speech[convo]             = new Output[5];
        allSceneDialogue_speech[convo][sentence++] = new Output((int)Subject.Steve, "Hi Barry");
        allSceneDialogue_speech[convo][sentence++] = new Output((int)Subject.Barry, "Hi Steve");
        allSceneDialogue_speech[convo][sentence++] = new Output((int)Subject.Steve, "Do you have cake?");
        allSceneDialogue_speech[convo][sentence++] = new Output((int)Subject.Barry, "Umm no, why would I...");
        allSceneDialogue_speech[convo][sentence++] = new Output((int)Subject.Megan, "Cake? :)");
        testSet = allSceneDialogue_speech[convo][allSceneDialogue_speech[convo].Length - 1].m_subjectId;//Check that all sentences have been set.
        allSceneDialogue_functions[convo] = new AfterFunc[] { new AfterFunc((int)Subject.Steve, 1, 0, null), new AfterFunc((int)Subject.Megan, 11, 1, null) };
        allSceneDialogue_actions[convo]   = new DialogueAction(testFunc, new int[] { 1, 2, 3, 4 });

        convo = 1; sentence = 0;
        allSceneDialogue_speech[convo]             = new Output[1];
        allSceneDialogue_speech[convo][sentence++] = new Output((int)Subject.Steve, "Nope.");
        testSet = allSceneDialogue_speech[convo][allSceneDialogue_speech[convo].Length - 1].m_subjectId;//Check that all sentences have been set.
        allSceneDialogue_functions[convo] = new AfterFunc[] { new AfterFunc((int)Subject.Steve, 5, 0, null) };

        convo = 2; sentence = 0;
        allSceneDialogue_speech[convo]             = new Output[3];
        allSceneDialogue_speech[convo][sentence++] = new Output((int)Subject.Sandy, "Hi Megan");
        allSceneDialogue_speech[convo][sentence++] = new Output((int)Subject.Megan, "Aggggggggggggggggggggg");
        allSceneDialogue_speech[convo][sentence++] = new Output((int)Subject.Sandy, "Umm what?");
        testSet = allSceneDialogue_speech[convo][allSceneDialogue_speech[convo].Length - 1].m_subjectId;//Check that all sentences have been set.
        allSceneDialogue_functions[convo] = new AfterFunc[] { new AfterFunc((int)Subject.Sandy, 10, 0, null) };

        convo = 3; sentence = 0;
        allSceneDialogue_speech[convo]             = new Output[10];
        allSceneDialogue_speech[convo][sentence++] = new Output((int)Subject.Bruce, "Oi Barry!");
        allSceneDialogue_speech[convo][sentence++] = new Output((int)Subject.Barry, "Yes?");
        allSceneDialogue_speech[convo][sentence++] = new Output((int)Subject.Bruce, "Where's the cake?");
        allSceneDialogue_speech[convo][sentence++] = new Output((int)Subject.Barry, "I don't know.");
        allSceneDialogue_speech[convo][sentence++] = new Output((int)Subject.Megan, "Cake?");
        allSceneDialogue_speech[convo][sentence++] = new Output((int)Subject.Barry, "No Megan, there is no cake.");
        allSceneDialogue_speech[convo][sentence++] = new Output((int)Subject.Bruce, "Yes there is.");
        allSceneDialogue_speech[convo][sentence++] = new Output((int)Subject.Barry, "Well I don't know where it is.");
        allSceneDialogue_speech[convo][sentence++] = new Output((int)Subject.Megan, "I do.");
        allSceneDialogue_speech[convo][sentence++] = new Output((int)Subject.Bruce, "Where?");
        testSet = allSceneDialogue_speech[convo][allSceneDialogue_speech[convo].Length - 1].m_subjectId;//Check that all sentences have been set.
        allSceneDialogue_functions[convo] = new AfterFunc[] { new AfterFunc((int)Subject.Bruce, 8, 0, null) };

        convo = 4; sentence = 0;
        allSceneDialogue_speech[convo]             = new Output[3];
        allSceneDialogue_speech[convo][sentence++] = new Output((int)Subject.Darol, "Hi Barry");
        allSceneDialogue_speech[convo][sentence++] = new Output((int)Subject.Bruce, "But I'm Bruce");
        allSceneDialogue_speech[convo][sentence++] = new Output((int)Subject.Steve, "Do you have cake?");
        testSet = allSceneDialogue_speech[convo][allSceneDialogue_speech[convo].Length - 1].m_subjectId;//Check that all sentences have been set.
        allSceneDialogue_functions[convo] = new AfterFunc[] { new AfterFunc((int)Subject.Steve, 3, 0, null), new AfterFunc((int)Subject.Darol, 7, 0, null) };

        convo = 5; sentence = 0;
        allSceneDialogue_speech[convo]             = new Output[1];
        allSceneDialogue_speech[convo][sentence++] = new Output((int)Subject.Steve, "Sup dude");
        testSet = allSceneDialogue_speech[convo][allSceneDialogue_speech[convo].Length - 1].m_subjectId; //Check that all sentences have been set.
        allSceneDialogue_functions[convo] = new AfterFunc[] { };                                         //No changes

        convo = 6; sentence = 0;
        allSceneDialogue_speech[convo]             = new Output[1];
        allSceneDialogue_speech[convo][sentence++] = new Output((int)Subject.Barry, "I'm Barry");
        testSet = allSceneDialogue_speech[convo][allSceneDialogue_speech[convo].Length - 1].m_subjectId; //Check that all sentences have been set.
        allSceneDialogue_functions[convo] = new AfterFunc[] { };                                         //No changes

        convo = 7; sentence = 0;
        allSceneDialogue_speech[convo]             = new Output[1];
        allSceneDialogue_speech[convo][sentence++] = new Output((int)Subject.Darol, "Heyyyyyyyy");
        testSet = allSceneDialogue_speech[convo][allSceneDialogue_speech[convo].Length - 1].m_subjectId; //Check that all sentences have been set.
        allSceneDialogue_functions[convo] = new AfterFunc[] { };                                         //No changes

        convo = 8; sentence = 0;
        allSceneDialogue_speech[convo]             = new Output[1];
        allSceneDialogue_speech[convo][sentence++] = new Output((int)Subject.Bruce, "Yo yo yo");
        testSet = allSceneDialogue_speech[convo][allSceneDialogue_speech[convo].Length - 1].m_subjectId; //Check that all sentences have been set.
        allSceneDialogue_functions[convo] = new AfterFunc[] { };                                         //No changes

        convo = 9; sentence = 0;
        allSceneDialogue_speech[convo]             = new Output[1];
        allSceneDialogue_speech[convo][sentence++] = new Output((int)Subject.Megan, "I'm Meg");
        testSet = allSceneDialogue_speech[convo][allSceneDialogue_speech[convo].Length - 1].m_subjectId; //Check that all sentences have been set.
        allSceneDialogue_functions[convo] = new AfterFunc[] { };                                         //No changes

        convo = 10; sentence = 0;
        allSceneDialogue_speech[convo]             = new Output[1];
        allSceneDialogue_speech[convo][sentence++] = new Output((int)Subject.Sandy, "I'm Sandy, but have you met my sister Cindy?");
        testSet = allSceneDialogue_speech[convo][allSceneDialogue_speech[convo].Length - 1].m_subjectId;//Check that all sentences have been set.
        allSceneDialogue_functions[convo] = new AfterFunc[] { };

        convo = 11; sentence = 0;
        allSceneDialogue_speech[convo]             = new Output[1];
        allSceneDialogue_speech[convo][sentence++] = new Output((int)Subject.Megan, "I like cake :)");
        testSet = allSceneDialogue_speech[convo][allSceneDialogue_speech[convo].Length - 1].m_subjectId;//Check that all sentences have been set.
        allSceneDialogue_functions[convo] = new AfterFunc[] { new AfterFunc((int)Subject.Megan, 12, 0, null) };

        convo = 12; sentence = 0;
        allSceneDialogue_speech[convo]             = new Output[1];
        allSceneDialogue_speech[convo][sentence++] = new Output((int)Subject.Megan, "What food do you like?");
        testSet = allSceneDialogue_speech[convo][allSceneDialogue_speech[convo].Length - 1].m_subjectId;//Check that all sentences have been set.
        allSceneDialogue_functions[convo] = new AfterFunc[] { new AfterFunc((int)Subject.Megan, 9, 0, null) };
        allSceneDialogue_menus[convo]     = new DialogueMenuData(MenuResultInstruct.SaveToPlayerPrefs_Int, new DialogueMenuOption[] { new DialogueMenuOption(13, "Cake", new SpeechSaveData(SaveL_foodChoice, 0))
                                                                                                                                      , new DialogueMenuOption(14, "Candy", new SpeechSaveData(SaveL_foodChoice, 1)), new DialogueMenuOption(18, "Broccoli", new SpeechSaveData(SaveL_foodChoice, 2))
                                                                                                                                      , new DialogueMenuOption(14, "Pizza", new SpeechSaveData(SaveL_foodChoice, 3)), new DialogueMenuOption(14, "Chips", new SpeechSaveData(SaveL_foodChoice, 4))
                                                                                                                                      , new DialogueMenuOption(19, "Mud", new SpeechSaveData(SaveL_foodChoice, 5)) });

        convo = 13; sentence = 0;
        allSceneDialogue_speech[convo]             = new Output[1];
        allSceneDialogue_speech[convo][sentence++] = new Output((int)Subject.Megan, "Woop! :D");
        testSet = allSceneDialogue_speech[convo][allSceneDialogue_speech[convo].Length - 1].m_subjectId;//Check that all sentences have been set.
        allSceneDialogue_functions[convo] = new AfterFunc[] { new AfterFunc((int)Subject.Steve, 15, 1, null) };

        convo = 14; sentence = 0;
        allSceneDialogue_speech[convo]             = new Output[1];
        allSceneDialogue_speech[convo][sentence++] = new Output((int)Subject.Megan, "Oh you're boring :(.");
        testSet = allSceneDialogue_speech[convo][allSceneDialogue_speech[convo].Length - 1].m_subjectId;//Check that all sentences have been set.
        allSceneDialogue_functions[convo] = new AfterFunc[] { new AfterFunc((int)Subject.Megan, 16, 0, null) };

        convo = 15; sentence = 0;
        allSceneDialogue_speech[convo]             = new Output[1];
        allSceneDialogue_speech[convo][sentence++] = new Output((int)Subject.Steve, "Why did you choose cake?!");
        testSet = allSceneDialogue_speech[convo][allSceneDialogue_speech[convo].Length - 1].m_subjectId;//Check that all sentences have been set.
        allSceneDialogue_functions[convo] = new AfterFunc[] { new AfterFunc((int)Subject.Steve, 5, 0, null) };

        convo = 16; sentence = 0;
        allSceneDialogue_speech[convo]             = new Output[1];
        allSceneDialogue_speech[convo][sentence++] = new Output((int)Subject.Megan, "Changed your mind? :)");
        testSet = allSceneDialogue_speech[convo][allSceneDialogue_speech[convo].Length - 1].m_subjectId;//Check that all sentences have been set.
        allSceneDialogue_functions[convo] = new AfterFunc[] { new AfterFunc((int)Subject.Megan, 9, 0, null) };
        allSceneDialogue_menus[convo]     = new DialogueMenuData(MenuResultInstruct.NONE, new DialogueMenuOption[] { new DialogueMenuOption(13, "Yes", null), new DialogueMenuOption(17, "Nope", null) });

        convo = 17; sentence = 0;
        allSceneDialogue_speech[convo]             = new Output[1];
        allSceneDialogue_speech[convo][sentence++] = new Output((int)Subject.Megan, "You're mean :|");
        testSet = allSceneDialogue_speech[convo][allSceneDialogue_speech[convo].Length - 1].m_subjectId;//Check that all sentences have been set.
        allSceneDialogue_functions[convo] = new AfterFunc[] { new AfterFunc((int)Subject.Megan, 9, 0, null) };

        convo = 18; sentence = 0;
        allSceneDialogue_speech[convo]             = new Output[1];
        allSceneDialogue_speech[convo][sentence++] = new Output((int)Subject.Megan, "Ewww who let the square in?");
        testSet = allSceneDialogue_speech[convo][allSceneDialogue_speech[convo].Length - 1].m_subjectId;//Check that all sentences have been set.
        allSceneDialogue_functions[convo] = new AfterFunc[] { new AfterFunc((int)Subject.Megan, 9, 0, null) };

        convo = 19; sentence = 0;
        allSceneDialogue_speech[convo]             = new Output[1];
        allSceneDialogue_speech[convo][sentence++] = new Output((int)Subject.Megan, "Whyyyyyyyyyyy??");
        testSet = allSceneDialogue_speech[convo][allSceneDialogue_speech[convo].Length - 1].m_subjectId;//Check that all sentences have been set.
        allSceneDialogue_functions[convo] = new AfterFunc[] { new AfterFunc((int)Subject.Megan, 9, 0, null) };

        convo = 20; sentence = 0;
        allSceneDialogue_speech[convo]             = new Output[1];
        allSceneDialogue_speech[convo][sentence++] = new Output((int)Subject.Megan, "I like you, you like cake :)");
        testSet = allSceneDialogue_speech[convo][allSceneDialogue_speech[convo].Length - 1].m_subjectId;//Check that all sentences have been set.
        allSceneDialogue_functions[convo] = new AfterFunc[] { };

        convo = 21; sentence = 0;
        allSceneDialogue_speech[convo]             = new Output[1];
        allSceneDialogue_speech[convo][sentence++] = new Output((int)Subject.Megan, "Whyyyyyyyyyyy??");
        testSet = allSceneDialogue_speech[convo][allSceneDialogue_speech[convo].Length - 1].m_subjectId;//Check that all sentences have been set.
        allSceneDialogue_functions[convo] = new AfterFunc[] { };

        convo = 22; sentence = 0;
        allSceneDialogue_speech[convo]             = new Output[3];
        allSceneDialogue_speech[convo][sentence++] = new Output((int)Subject.Darol, "I'm here, there and everywhere.");
        allSceneDialogue_speech[convo][sentence++] = new Output(MeId, ":/");
        allSceneDialogue_speech[convo][sentence++] = new Output((int)Subject.Darol, "Have fear.");
        testSet = allSceneDialogue_speech[convo][allSceneDialogue_speech[convo].Length - 1].m_subjectId;//Check that all sentences have been set.
        allSceneDialogue_functions[convo] = new AfterFunc[] { };

        convo = 23; sentence = 0;
        allSceneDialogue_speech[convo]             = new Output[2];
        allSceneDialogue_speech[convo][sentence++] = new Output((int)Subject.Sandy, "Cindy called to tell me you said Hi.");
        allSceneDialogue_speech[convo][sentence++] = new Output((int)Subject.Sandy, "That was nice :)");
        testSet = allSceneDialogue_speech[convo][allSceneDialogue_speech[convo].Length - 1].m_subjectId;//Check that all sentences have been set.
        allSceneDialogue_functions[convo] = new AfterFunc[] { };
    }
Esempio n. 3
0
    /*//Used to start a new Dialogue output that's triggered from a button rather than a character.
     * public void setNewDialogueSpeech(int dialogueIndex)
     * {
     *  //If a menu option is selected then use the Dialogue Index attached to the
     *  //menu option to start a new Speech.
     *  dialogueManager.startDialogueOutput(dialogueIndex);
     * }*/

    public void setDialogueMenu(DialogueMenuData dialogueMenuData)
    {
        dialogueMenuActive = true;
        setNextButtonEnabled(false);
        dialogueMenu.setMenuActive(dialogueMenuData);
    }
Esempio n. 4
0
    public void setup()
    {
        //Load and save important data.



        //Setup Dialogue outputs
        allNpcNames = new string[(int)Subject.MaxValue] {
            "Cindy", "Charly", "Darol"
        };
        allNpcStartingDialogue = new int[(int)Subject.MaxValue] {
            0, 2, 4
        };

        const int MaxConvoNum = 6;
        int       convo, sentence;
        int       testSet;

        allSceneDialogue_speech    = new Output[MaxConvoNum][];
        allSceneDialogue_functions = new AfterFunc[MaxConvoNum][];
        allSceneDialogue_menus     = new DialogueMenuData[MaxConvoNum];
        allSceneDialogue_actions   = new DialogueAction[MaxConvoNum];

        convo = 0; sentence = 0;
        allSceneDialogue_speech[convo]             = new Output[3];
        allSceneDialogue_speech[convo][sentence++] = new Output((int)Subject.Cindy, "Oh hi");
        allSceneDialogue_speech[convo][sentence++] = new Output(MeId, "Hey");
        allSceneDialogue_speech[convo][sentence++] = new Output((int)Subject.Cindy, "... Why are you here?");
        testSet = allSceneDialogue_speech[convo][allSceneDialogue_speech[convo].Length - 1].m_subjectId;//Check that all sentences have been set.
        allSceneDialogue_functions[convo] = new AfterFunc[] { new AfterFunc((int)Subject.Cindy, 1, 0, null) };
        allSceneDialogue_menus[convo]     = new DialogueMenuData(MenuResultInstruct.SaveToPlayerPrefs_Int, new DialogueMenuOption[] { new DialogueMenuOption(5, "To say hi to you", new SpeechSaveData(SaveL_sayHiToCindy, 0)) });

        convo = 1; sentence = 0;
        allSceneDialogue_speech[convo]             = new Output[1];
        allSceneDialogue_speech[convo][sentence++] = new Output((int)Subject.Cindy, "I'm still thinking.");
        testSet = allSceneDialogue_speech[convo][allSceneDialogue_speech[convo].Length - 1].m_subjectId;//Check that all sentences have been set.
        allSceneDialogue_functions[convo] = new AfterFunc[] { new AfterFunc((int)Subject.Charly, 3, 0, null) };

        convo = 2; sentence = 0;
        allSceneDialogue_speech[convo]             = new Output[1];
        allSceneDialogue_speech[convo][sentence++] = new Output((int)Subject.Charly, "Sup bud");
        testSet = allSceneDialogue_speech[convo][allSceneDialogue_speech[convo].Length - 1].m_subjectId;//Check that all sentences have been set.
        allSceneDialogue_functions[convo] = new AfterFunc[] { };

        convo = 3; sentence = 0;
        allSceneDialogue_speech[convo]             = new Output[3];
        allSceneDialogue_speech[convo][sentence++] = new Output((int)Subject.Charly, "Best not to bother her.");
        allSceneDialogue_speech[convo][sentence++] = new Output(MeId, "Why?");
        allSceneDialogue_speech[convo][sentence++] = new Output((int)Subject.Charly, "Because she's thinking!");
        testSet = allSceneDialogue_speech[convo][allSceneDialogue_speech[convo].Length - 1].m_subjectId;//Check that all sentences have been set.
        allSceneDialogue_functions[convo] = new AfterFunc[] { new AfterFunc((int)Subject.Charly, 2, 0, null) };

        convo = 4; sentence = 0;
        allSceneDialogue_speech[convo]             = new Output[4];
        allSceneDialogue_speech[convo][sentence++] = new Output((int)Subject.Darol, "Hi ");
        allSceneDialogue_speech[convo][sentence++] = new Output(MeId, "Wheren't you in the other room?");
        allSceneDialogue_speech[convo][sentence++] = new Output((int)Subject.Darol, "Yes");
        allSceneDialogue_speech[convo][sentence++] = new Output(MeId, ":/");
        testSet = allSceneDialogue_speech[convo][allSceneDialogue_speech[convo].Length - 1].m_subjectId;//Check that all sentences have been set.
        allSceneDialogue_functions[convo] = new AfterFunc[] { new AfterFunc(-1, -1, NoAnimChange, new SpeechSaveData(SaveL_seeDarolInTwoPlaces, 0)) };

        convo = 5; sentence = 0;
        allSceneDialogue_speech[convo]             = new Output[1];
        allSceneDialogue_speech[convo][sentence++] = new Output((int)Subject.Cindy, "That's sweet");
        testSet = allSceneDialogue_speech[convo][allSceneDialogue_speech[convo].Length - 1].m_subjectId;//Check that all sentences have been set.
        allSceneDialogue_functions[convo] = new AfterFunc[] { new AfterFunc((int)Subject.Cindy, 1, 0, null) };
    }