I see that way in the qt-flying bus example, but I make the lvls with qml, and one loader that read a signal next game and change the level, but the way to make that the level-loader read the scores of each level is this that I dont know how to do.
I do this to make one database to the first lvl:
@function guardardatos() {
var db = openDatabaseSync("lvl1", "1.0", "primerlvl", 1000000);
var rs;
db.transaction(
function(tx) {
// Create the database if it doesn't already exist
tx.executeSql('CREATE TABLE IF NOT EXISTS Niveluno(uno INT, dos INT)');
// Add (another) greeting row
tx.executeSql('INSERT INTO Niveluno VALUES(?, ?)', [ recto.score, recto.burbujas1]);
// Show all added greetings
rs = tx.executeSql('SELECT * FROM Niveluno ORDER BY uno desc LIMIT 1');
}
)
if (rs.rows.length > 0) {
var record = rs.rows.item(0);
recto.lvl1 = record.uno;
}
}@
When the lvl ends I write 2 values: the score and and the quantity of bubbles eated,
lather I created a other datbase called guardarDatos1() for the lvl 2 etc..., when I start the game one Timer reads all the databases and update the scores in the levelmenu and show which is active, pased with his score and which is bocked to the user. I dont know other form to make this, and in C++ buff is other world.
if other knows other form to do this please explain me!!