Is there a way to integrate a local database file, such as a question database, into my quiz game using Cocos Creator's default JavaScript script? I've searched the official Cocos Creator site and forums but haven't found any tutorials. I did come across a solution for C++ on Stack Overflow, but I prefer to use JavaScript with 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'm looking for a JavaScript solution because my expertise lies in that language rather than C++.