Commit e1791029 authored by Tt's avatar Tt

放置连续点击

parent 85d32df4
No preview for this file type
......@@ -1961,7 +1961,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 150.74,
"width": 148.45,
"height": 63
},
"_anchorPoint": {
......@@ -2047,7 +2047,7 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
208.95399999999995,
206.664,
0,
0,
0,
......
......@@ -13,18 +13,18 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
addPreloadAudio() {
let audios = [];
function checkAudio(obj) {
for (let idx in obj) {
if (typeof obj[idx] == "object") {
checkAudio(obj[idx]);
} else if (typeof obj[idx] == "string") {
if (obj[idx].indexOf(".mp3") > -1) audios.push(obj[idx]);
}
}
}
checkAudio(this.data)
this._audioResList = audios;
// let audios = [];
// function checkAudio(obj) {
// for (let idx in obj) {
// if (typeof obj[idx] == "object") {
// checkAudio(obj[idx]);
// } else if (typeof obj[idx] == "string") {
// if (obj[idx].indexOf(".mp3") > -1) audios.push(obj[idx]);
// }
// }
// }
// checkAudio(this.data)
this._audioResList = []//audios;
}
addPreloadAnima() {
......@@ -199,7 +199,10 @@ export default class SceneComponent extends MyCocosSceneComponent {
pg.view.touchOn(item, this.touchPaoPao, this)
}
// 点击泡泡
private touchForid: boolean;
touchPaoPao(e: any) {
if (this.touchForid) return;
this.touchForid = true;
// 如果泡泡没有到指定位置不允许点击
let item = e.target;
let data = e.target.data;
......@@ -214,6 +217,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
pg.view.visible(broken, true)
this.scheduleOnce(() => {
item.parent = null;
this.touchForid = false;
}, 0.5);
this.rightList.push(data);
......@@ -223,7 +227,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
pg.event.once('layer_coin_show_coin_end', () => {
this.nextQuestion();
}) // 动画回调
})
// 动画回调
pg.event.emit('layer_coin_show_coin', 3) //1 2 3硬币数量
}
} else {
......@@ -234,6 +239,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
.to(0.1, { x: 0 })
.to(0.1, { x: 15 })
.to(0.1, { x: 0 })
.call(() => {
this.touchForid = false;
})
.start()
}
}
......
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