Beispiel #1
0
    public void _sqlite()
    {
        Debug.Log("--------------------------");
        string        conn = "URI=file:" + Application.dataPath + "/Plugins/Ronda.db";
        IDbConnection dbconn;

        dbconn = (IDbConnection) new SqliteConnection(conn);
        dbconn.Open();

        string player1 = Input1.GetComponent <Text> ().text;
        string player2 = Input2.GetComponent <Text> ().text;

        //Guarda el nombre de los jugadores para poder usarlos en otra escena
        StaticPlayers.p1 = player1;
        StaticPlayers.p2 = player2;

        //Inserciones iniciales

        _InsertarJugador(player1, ref dbconn);
        _InsertarJugador(player2, ref dbconn);
        _InsertarMatchup(player1, player2, ref dbconn);
        _NuevaPartida(ref dbconn);
        _InsertarParticipacion(player1, ref dbconn);
        _InsertarParticipacion(player2, ref dbconn);

        dbconn.Close();
        dbconn = null;
    }