Commit b94e21b6 authored by asdf's avatar asdf

.

parent 606ebabf
...@@ -150,9 +150,9 @@ cc.Class({ ...@@ -150,9 +150,9 @@ cc.Class({
let designScale = bgWidth / bgHeight; let designScale = bgWidth / bgHeight;
let scale = size.width / size.height; let scale = size.width / size.height;
if (scale > designScale) { if (scale > designScale) {
this.dragonBone.node.parent.scale = bgWidth / size.width; this.dragonBone.node.scale = bgWidth / size.width;
} else { } else {
this.dragonBone.node.parent.scale = bgHeight / size.height; this.dragonBone.node.scale = bgHeight / size.height;
} }
} }
}, },
......
...@@ -110,6 +110,7 @@ cc.Class({ ...@@ -110,6 +110,7 @@ cc.Class({
addPreloadItem() { addPreloadItem() {
for (let i = 0; i < this.data.questionList.length; i++) { for (let i = 0; i < this.data.questionList.length; i++) {
this._resList.push({ url: this.data.questionAudio }); this._resList.push({ url: this.data.questionAudio });
this._resList.push({ url: this.data.questionList[i].pageAudio });
for (let j = 0; j < this.data.questionList[i].optionList.length; j++) { for (let j = 0; j < this.data.questionList[i].optionList.length; j++) {
this._resList.push({ url: this.data.questionList[i].optionList[j].optionAudio }); this._resList.push({ url: this.data.questionList[i].optionList[j].optionAudio });
this._resList.push({ url: this.data.questionList[i].optionList[j].optionDragonBone.skeJsonData.url }); this._resList.push({ url: this.data.questionList[i].optionList[j].optionDragonBone.skeJsonData.url });
...@@ -216,7 +217,7 @@ cc.Class({ ...@@ -216,7 +217,7 @@ cc.Class({
}, },
playAudioPage(isBtn) { playAudioPage(isBtn) {
GameData.audioCount++; GameData.audioCount++;
let url = this.data.pageAudio; let url = this.data.questionList[GameData.questionIndex].pageAudio;
// url = 'http://127.0.0.1/iamflying.mp3'; // url = 'http://127.0.0.1/iamflying.mp3';
cc.assetManager.loadRemote(url, null, (err, clip) => { cc.assetManager.loadRemote(url, null, (err, clip) => {
if (err) { if (err) {
...@@ -481,7 +482,7 @@ cc.Class({ ...@@ -481,7 +482,7 @@ cc.Class({
playAudio(cb) { playAudio(cb) {
GameData.audioCount++; GameData.audioCount++;
let url = this.data.optionAudio; let url = this.data.questionAudio;
// url = 'http://127.0.0.1/iamflying.mp3'; // url = 'http://127.0.0.1/iamflying.mp3';
cc.assetManager.loadRemote(url, null, (err, clip) => { cc.assetManager.loadRemote(url, null, (err, clip) => {
if (err) { if (err) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment