I want to use a local database file such as question database for my quiz game. I can't find any tutorial on official cocos creator site or forums. In c++ already solved the problem
Use database (such as sqlite) with cocos2d-x
But I want to use it with below javascript, which is the default script in Cocos creator
cc.Class({
extends: cc.Component,
properties: {
// foo: {
// default: null, // The default value will be used only when the component attaching
// to a node for the first time
// url: cc.Texture2D, // optional, default is typeof default
// serializable: true, // optional, default is true
// visible: true, // optional, default is true
// displayName: 'Foo', // optional
// readonly: false, // optional, default is false
// },
// ...
},
// use this for initialization
onLoad: function () {
},
onbuttnclick: function(){
//var test = new cc.Scene('test');
//cc.director.pushScene(test);
cc.director.loadScene('helloworld');
//cc.director.popScene();
},
// called every frame, uncomment this function to activate update callback
// update: function (dt) {
// },
});
I need a solution in javascript because I am poor in c++