Commit 315dbab3 authored by 张世斌's avatar 张世斌

1.修复bug

parent fad2bfdb
......@@ -7005,7 +7005,7 @@
}
],
"_prefab": null,
"_opacity": 0,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
......
......@@ -166,6 +166,15 @@ cc.Class({
this.playAudioByName('click');
});
}
// this.paint.on("Click",()=>{
// playDragonBoneAnimation(this.coolcat, 'wrong', -1);
// this.playAudioByUrl(this.data.wrongAudio,()=>{
// playDragonBoneAnimation(this.coolcat, 'normal', -1);
// this._can_tap = true;
// })
// })
this.paint.active = false;
this.paint2.active = false;
......@@ -205,7 +214,7 @@ cc.Class({
this.paint.active = false;
this.paint2.active = true;
this.color_paint.active = false;
this.btn_submit.node.active = false;
this.btn_submit.node.active = false;
},
cleanColor() {
......@@ -446,35 +455,67 @@ cc.Class({
// this._can_tap = true;
// });
},
showRestartBtn() {
const btn = cc.find('Canvas/bg/btnReplay');
if (btn.canClick) {
return;
}
btn.active = true;
btn.off('click');
btn.on('click', () => {
console.log('汪汪汪');
cc.director.loadScene('OP10');
});
btn.canClick = true;
const circle = cc.find('Canvas/bg/btnReplay/bg_circle');
cc.tween(circle)
.set({ scale: 0.8, opacity: 255 })
.to(2, { scale: 1.2, opacity: 0 })
.union()
.repeatForever()
.start();
},
hideRestartBtn() {
.set({ scale: 0.8, opacity: 255 })
.to(2, { scale: 1.2, opacity: 0 })
.union()
.repeatForever()
.start();
},
hideRestartBtn() {
console.log('hideRestartBtn');
const btn = cc.find('Canvas/bg/btnReplay');
if (!btn.canClick) {
return;
}
btn.canClick = false;
btn.active = false;
const circle = cc.find('Canvas/bg/btnReplay/bg_circle');
circle.stopAllActions();
circle.scale = 0.8;
circle.opacity = 255;
},
},
// showRestartBtn() {
// const btn = cc.find('Canvas/bg/btnReplay');
// btn.active = true;
// btn.off('click');
// btn.on('click', () => {
// console.log('汪汪汪');
// cc.director.loadScene('OP10');
// });
// const circle = cc.find('Canvas/bg/btnReplay/bg_circle');
// cc.tween(circle)
// .set({ scale: 0.8, opacity: 255 })
// .to(2, { scale: 1.2, opacity: 0 })
// .union()
// .repeatForever()
// .start();
// },
// hideRestartBtn() {
// console.log('hideRestartBtn');
// const btn = cc.find('Canvas/bg/btnReplay');
// btn.active = false;
// const circle = cc.find('Canvas/bg/btnReplay/bg_circle');
// circle.stopAllActions();
// circle.scale = 0.8;
// circle.opacity = 255;
// },
// ------------------------------------------------
......@@ -553,7 +594,9 @@ cc.Class({
console.log('isCanFinish:', isCanFinish);
if (isCanFinish) {
this.playAudioByUrl(this.data.finishAudio);
this.playAudioByUrl(this.data.finishAudio,()=>{
this.showRestartBtn();
});
this.submitBtnClick();
}
},
......
export const defaultData =
{
// "items": [
// {
// "words": "FdFFf",
// "answers": "01234",
// "audio_url": "http://staging-teach.cdn.ireadabc.com/18bf8207ddea222c9b82c68f2549dadc.mp3",
// "pos":[
// [-425.989,-6.456],
// [-37.043,195.708],
// [151.487,-129.498],
// [570.348,200],
// [617.5,43.247]
// ]
// },
// {
// "words": "aAcBaCbA",
// "answers": "0147",
// "audio_url": "http://staging-teach.cdn.ireadabc.com/18bf8207ddea222c9b82c68f2549dadc.mp3"
// },
// ],
"startAudio": "http://staging-teach.cdn.ireadabc.com/18bf8207ddea222c9b82c68f2549dadc.mp3",
"waitAudio": "http://staging-teach.cdn.ireadabc.com/46cba1330608d848239ec6a68bb4707e.mp3",
"finishAudio": "http://staging-teach.cdn.ireadabc.com/b3260e3d6972cc59b345f573aaab4290.mp3",
"finishWaitAudio": "http://staging-teach.cdn.ireadabc.com/b3260e3d6972cc59b345f573aaab4290.mp3",
"startAudio": "http://staging-teach.cdn.ireadabc.com/4825751d08e1c98d0dcdddfa7179c032.mp3",
"waitAudio": "http://staging-teach.cdn.ireadabc.com/0ffe3f98883ff30d748c0844df4165de.mp3",
"finishAudio": "http://staging-teach.cdn.ireadabc.com/6744384bc007957f887416755f7957ed.mp3",
"finishWaitAudio": "http://staging-teach.cdn.ireadabc.com/b9a8a12aea0255f33cb9f9bbe6edc68e.mp3",
"rightAudio": "http://staging-teach.cdn.ireadabc.com/e3921a16a8313df274d8bc4e3f2bedd8.mp3",
"wrongAudio": "http://staging-teach.cdn.ireadabc.com/fca98e3ed3f1269c07de6aac67f9d2c2.mp3",
"bg": "http://staging-teach.cdn.ireadabc.com/90bd03bdc2437b51055ed0423bac9b4a.png",
"bg": "http://staging-teach.cdn.ireadabc.com/5a6b2c02be73b864c7aa5d83099c6263.png",
"images": [
{
"img": "http://staging-teach.cdn.ireadabc.com/4cc0099a522ba36f0916b6aeb5c85a84.png"
"img": "http://staging-teach.cdn.ireadabc.com/6c067520bcd17697c8258c14a5549254.png"
},
{
"img": "http://staging-teach.cdn.ireadabc.com/5ef1b6241fbdb251848ec9ae3bc3773a.png"
"img": "http://staging-teach.cdn.ireadabc.com/9fb2c19d37ee3f71352c85fb3fe08768.png"
},
{
"img": "http://staging-teach.cdn.ireadabc.com/b8369480bf8db275d94c889d6155ab52.png"
"img": "http://staging-teach.cdn.ireadabc.com/c281cbfa449b15f6d2a444f1162bf421.png"
},
{
"img": "http://staging-teach.cdn.ireadabc.com/3caca3cd7fff035545689e1b0d5cc724.png"
"img": "http://staging-teach.cdn.ireadabc.com/7f3edde8f0cc7735aa80fdebd66128a1.png"
},
{
"img": "http://staging-teach.cdn.ireadabc.com/e6b058fa93f6d635afab2c3b853d3ac1.png"
"img": "http://staging-teach.cdn.ireadabc.com/5d5dea9d5386cb9222370857fb045789.png"
},
{
"img": "http://staging-teach.cdn.ireadabc.com/19d0a2daa008eede2d9ec880da746ced.png"
}
]
}
// {
// // "items": [
// // {
// // "words": "FdFFf",
// // "answers": "01234",
// // "audio_url": "http://staging-teach.cdn.ireadabc.com/18bf8207ddea222c9b82c68f2549dadc.mp3",
// // "pos":[
// // [-425.989,-6.456],
// // [-37.043,195.708],
// // [151.487,-129.498],
// // [570.348,200],
// // [617.5,43.247]
// // ]
// // },
// // {
// // "words": "aAcBaCbA",
// // "answers": "0147",
// // "audio_url": "http://staging-teach.cdn.ireadabc.com/18bf8207ddea222c9b82c68f2549dadc.mp3"
// // },
// // ],
// "startAudio": "http://staging-teach.cdn.ireadabc.com/18bf8207ddea222c9b82c68f2549dadc.mp3",
// "waitAudio": "http://staging-teach.cdn.ireadabc.com/46cba1330608d848239ec6a68bb4707e.mp3",
// "finishAudio": "http://staging-teach.cdn.ireadabc.com/b3260e3d6972cc59b345f573aaab4290.mp3",
// "finishWaitAudio": "http://staging-teach.cdn.ireadabc.com/b3260e3d6972cc59b345f573aaab4290.mp3",
// "rightAudio": "http://staging-teach.cdn.ireadabc.com/e3921a16a8313df274d8bc4e3f2bedd8.mp3",
// "wrongAudio": "http://staging-teach.cdn.ireadabc.com/fca98e3ed3f1269c07de6aac67f9d2c2.mp3",
// "bg": "http://staging-teach.cdn.ireadabc.com/90bd03bdc2437b51055ed0423bac9b4a.png",
// "images": [
// {
// "img": "http://staging-teach.cdn.ireadabc.com/4cc0099a522ba36f0916b6aeb5c85a84.png"
// },
// {
// "img": "http://staging-teach.cdn.ireadabc.com/5ef1b6241fbdb251848ec9ae3bc3773a.png"
// },
// {
// "img": "http://staging-teach.cdn.ireadabc.com/b8369480bf8db275d94c889d6155ab52.png"
// },
// {
// "img": "http://staging-teach.cdn.ireadabc.com/3caca3cd7fff035545689e1b0d5cc724.png"
// },
// {
// "img": "http://staging-teach.cdn.ireadabc.com/e6b058fa93f6d635afab2c3b853d3ac1.png"
// }
// ]
// }
// {
// "items": [
// {
......
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