Exemple #1
0
    void Start()
    {
        // points to very first conversation
        //Prep work
        dailog = GameObject.Find("Dialog").GetComponent <TextMeshProUGUI>();

        if (buttons.Length < 5)
        {
            Debug.Log("Need 5 buttons");
        }

        choice1       = buttons[0].text;
        choice1Button = buttons[0].button;

        choice2       = buttons[1].text;
        choice2Button = buttons[1].button;

        choice3       = buttons[2].text;
        choice3Button = buttons[2].button;

        choice4       = buttons[3].text;
        choice4Button = buttons[3].button;

        choice5       = buttons[4].text;
        choice5Button = buttons[4].button;

        choiceHold = GameObject.Find("Choicelist").GetComponent <ChoiceHolder>();

        textList = new List <TextMeshProUGUI> {
            choice1, choice2, choice3, choice4, choice5
        };
        buttonList = new List <Button> {
            choice1Button, choice2Button, choice3Button, choice4Button, choice5Button
        };

        dailogE = GameObject.Find("Overview").GetComponent <DailogEvents>();

        dateList = new List <List <string> > {
            choiceHold.dateA, choiceHold.dateB, choiceHold.dateC
        };
        //Begins dailog system
        GrabText();
    }
Exemple #2
0
    void Start()
    {
        // points to very first conversation
        //Prep work
        dailog = GameObject.Find("Dialog").GetComponent <TextMeshProUGUI>();

        // grabs pointer from playerprefs
        //____________________________________________________________________
        //____________________________________________________________________

        /*
         * // kills after testing    the game should work with out a hitch during normal play experince
         * PlayerPrefs.SetInt("Pointer", 1);
         *
         * //tempt delete later
         * PlayerPrefs.SetInt("Date", 0);
         */
        //____________________________________________________________________
        //____________________________________________________________________

        pointer = PlayerPrefs.GetInt("Pointer", 1);
        // grabs date from playerprefs
        currentDate = PlayerPrefs.GetInt("Date", 0);



        //  use to set pointer to be used inbtween scens  PlayerPrefs.SetInt("Pointer", 20);

        if (buttons.Length < 5)
        {
            Debug.Log("Need 5 buttons");
        }

        choice1       = buttons[0].text;
        choice1Button = buttons[0].button;

        choice2       = buttons[1].text;
        choice2Button = buttons[1].button;

        choice3       = buttons[2].text;
        choice3Button = buttons[2].button;

        choice4       = buttons[3].text;
        choice4Button = buttons[3].button;

        choice5       = buttons[4].text;
        choice5Button = buttons[4].button;

        choiceHold = GameObject.Find("Choicelist").GetComponent <ChoiceHolder>();

        textList = new List <TextMeshProUGUI> {
            choice1, choice2, choice3, choice4, choice5
        };
        buttonList = new List <Button> {
            choice1Button, choice2Button, choice3Button, choice4Button, choice5Button
        };

        dailogE = GameObject.Find("Overview").GetComponent <DailogEvents>();

        dateList = new List <List <string> > {
            choiceHold.dateA, choiceHold.dateB, choiceHold.dateC
        };

        //Begins dailog system
        GrabText();
    }