Exemplo n.º 1
0
    void Start()
    {
        DataBaseHandler    db = DataBaseHandler.Instance;
        GlobalPanelHandler ph = GlobalPanelHandler.Instance;

        aceptNewUser.onClick.AddListener(() =>
        {
            int x = int.Parse(age.text);
            db.CreateNewPlayer(nick.text, nombre.text, lname.text, x, correo.text);
            nick.text   = "";
            nombre.text = "";
            lname.text  = "";
            age.text    = "";
            correo.text = "";
            ph.PanelShowOff();
            db.UpdatePlayersDropdown(playersDrops);
        });

        cancelNewUser.onClick.AddListener(() =>
        {
            ph.PanelShowOff();
            nick.text   = "";
            nombre.text = "";
            lname.text  = "";
            age.text    = "";
            correo.text = "";
        });
    }