return;
}
- console.log('device ready');
+ console.log('device ready !');
DEVICE_READY = true;
}
if (DATAS.phonegap && !manifest && !OFFLINEAPP) {
+ console.log('set manifest from manifest pub');
+
manifest = collection.manifestPub[DATAS.id];
+
+ } else {
+ console.log('manifest set in local storage');
}
+ console.log(manifest.bundles[0].name + ' :: ' + manifest.bundles[0].contents[0]);
+
if (navigator.onLine && manifest && !OFFLINEAPP) {
console.log('init online');
var finishedLoading = false;
gal = new GameAssetLoader(json_parse(manifest, 'manifest'), fsprefix);
- gal.init(function() {
- startAfterLoading = true;
- init();
- });
+ gal.init(galLoaded);
gal.onLoaded(function(info) {
$(window).trigger('GALBundleLoaded', [info]);
});
$(window).on('GALBundleLoaded', function(e, info) {
+ console.log('Loaded :: ' + info.bundleName);
+
if (info.bundleName == 'content_4') {
fluidbook.changeAddress();
}
document.getElementsByTagName("head")[0].appendChild(script);
}
+ function galLoaded() {
+ startAfterLoading = true;
+ init();
+ }
+
function init() {
if (INITED == true) {
return;