123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- const bootState = {
-
- preload: function () {
-
- if (moodle) {
- loadLangState.firstTime = false;
- const moodleLang = iLMparameters.lang;
- switch (moodleLang) {
- case 'en':
- langString = 'en_US';
- break;
- case 'pt':
- langString = 'pt_BR';
- break;
- case 'fr':
- langString = 'fr_FR';
- break;
- case 'es':
- langString = 'es_PE';
- break;
- case 'it':
- langString = 'it_IT';
- break;
- default:
- langString = 'en_US';
- }
- game.load.lang('./assets/lang/' + langString);
- }
-
- if (isDebugMode) {
- console.log(url.boot.audio.length + ' audio files to cache');
- console.log(url.boot.image.length + ' images to cache');
- console.log(url.boot.sprite.length + ' sprites to cache');
- }
- game.load.audio(url.boot.audio);
- game.load.image(url.boot.image);
- game.load.sprite(url.boot.sprite);
- },
-
- create: function () {
-
-
- if (moodle) {
- game.state.start('menu');
- } else {
- game.state.start('lang');
- }
- },
- };
|