Esempio n. 1
0
    public void AddGamer()
    {
        string name;
        string surname;
        string email;

        name    = GameObject.Find("Q1InputField").GetComponent <InputField>().text;
        surname = GameObject.Find("Q2InputField").GetComponent <InputField>().text;
        email   = GameObject.Find("Q3InputField").GetComponent <InputField>().text;

        GUList.gameUserList.Add(new GameUser(name, surname, email, 0));
        GUList.SaveXMLData(path);
    }
Esempio n. 2
0
    void EvaluateWin()
    {
        //Debug.Break();
        // stop script routines
        stoptime = Time.time;
        // calculate score
        prepareScore();

        //show secret
        GameObject.Find("Secret").GetComponent <Secret> ().ShowSecret();
        GameObject.Find("/Canvas").transform.GetChild(2).gameObject.SetActive(true);

        //add score
        GameUsersContainer GUListlocal = GameObject.Find("/Canvas").transform.GetChild(0).GetComponent <UserList> ().GUList;
        GameUser           lastentry   = GUListlocal.gameUserList [GUListlocal.gameUserList.Count - 1];

        lastentry.score = Score;
        //save score to file
        GUListlocal.SaveXMLData(GameObject.Find("/Canvas").transform.GetChild(0).GetComponent <UserList> ().path);

        //sort

        //display highscore
    }