Commit 746522fc authored by Tt's avatar Tt

修改

parent a4158b3d
......@@ -300,7 +300,9 @@ cc.Class({
this.initLayout()//完成后直接进入下一步
})
} else {
this.setMaoAni("begin");
pg.audio.playAudioByUrl(this._cat.start).then(() => {
this.setMaoAni("normal");
this._catStartPlayed = true;
pg.view.loadDB(carton, { ske: this._stageData.cartoonSke, tex: this._stageData.cartoonTex, png: this._stageData.cartoonPng }).then((animationName) => {
this.animationName = animationName;
......@@ -486,7 +488,10 @@ cc.Class({
pg.view.visible(bg_tryagain, false);
pg.audio.playAudioByUrl(this._cat.finish)
this.setMaoAni("finish");
pg.audio.playAudioByUrl(this._cat.finish).then(() => {
this.setMaoAni("normal")
})
// this.playSFX("audio_finish");
// pg.view.visible(btn_picture, true);
pg.view.visible(btn_record, false);
......@@ -605,6 +610,13 @@ cc.Class({
pg.view.visible(btn_record, !isFinal);
// pg.view.visible(btn_record, true);
this.showRestartBtn();
if (isFinal) {
//执行总结束的内容
GameManager.getIns().setState(5);
this.initLayout()
}
if (this._audio_record) {
this._playing = false;
resolve("");
......@@ -618,6 +630,11 @@ cc.Class({
});
},
setMaoAni(aniName) {
let mao_ske = cc.find("mao_ske", this.node);
let ske = mao_ske.getComponent(dragonBones.ArmatureDisplay).playAnimation(aniName);
},
wordAni(item, content) {
......@@ -753,7 +770,9 @@ cc.Class({
onTouchCat() {
if (this._playing) return;
this._playing = true;
this.setMaoAni("begin");
pg.audio.playAudioByUrl(this._cat.wait).then(() => {
this.setMaoAni("normal");
this._playing = false;
})
},
......@@ -764,6 +783,7 @@ cc.Class({
this.pushResultData();
if (isOver) {
this.setMaoAni("finish");
//执行总结束的内容
GameManager.getIns().setState(5);
this.initLayout()
......
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