Commit e1791029 authored by Tt's avatar Tt

放置连续点击

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