Commit b94e21b6 authored by asdf's avatar asdf

.

parent 606ebabf
......@@ -150,9 +150,9 @@ cc.Class({
let designScale = bgWidth / bgHeight;
let scale = size.width / size.height;
if (scale > designScale) {
this.dragonBone.node.parent.scale = bgWidth / size.width;
this.dragonBone.node.scale = bgWidth / size.width;
} else {
this.dragonBone.node.parent.scale = bgHeight / size.height;
this.dragonBone.node.scale = bgHeight / size.height;
}
}
},
......
......@@ -110,6 +110,7 @@ cc.Class({
addPreloadItem() {
for (let i = 0; i < this.data.questionList.length; i++) {
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++) {
this._resList.push({ url: this.data.questionList[i].optionList[j].optionAudio });
this._resList.push({ url: this.data.questionList[i].optionList[j].optionDragonBone.skeJsonData.url });
......@@ -216,7 +217,7 @@ cc.Class({
},
playAudioPage(isBtn) {
GameData.audioCount++;
let url = this.data.pageAudio;
let url = this.data.questionList[GameData.questionIndex].pageAudio;
// url = 'http://127.0.0.1/iamflying.mp3';
cc.assetManager.loadRemote(url, null, (err, clip) => {
if (err) {
......@@ -481,7 +482,7 @@ cc.Class({
playAudio(cb) {
GameData.audioCount++;
let url = this.data.optionAudio;
let url = this.data.questionAudio;
// url = 'http://127.0.0.1/iamflying.mp3';
cc.assetManager.loadRemote(url, null, (err, clip) => {
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