提交
This commit is contained in:
parent
0b3cd8fb78
commit
0c1fa52444
File diff suppressed because it is too large
Load Diff
|
@ -150,7 +150,9 @@ export default class Block extends cc.Component {
|
||||||
touchDelta: cc.Vec2 = cc.v2(0, 0);
|
touchDelta: cc.Vec2 = cc.v2(0, 0);
|
||||||
adhesiveNode: any;
|
adhesiveNode: any;
|
||||||
checkCollision: boolean = false;
|
checkCollision: boolean = false;
|
||||||
|
//计时器
|
||||||
|
private scheduleCallback: any = null;
|
||||||
|
private scheduleCallback2: any = null;
|
||||||
|
|
||||||
|
|
||||||
onLoad() {
|
onLoad() {
|
||||||
|
@ -745,6 +747,8 @@ export default class Block extends cc.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
eliminate() {
|
eliminate() {
|
||||||
|
clearTimeout(this.scheduleCallback2);
|
||||||
|
clearTimeout(this.scheduleCallback);
|
||||||
//锤子状态消失
|
//锤子状态消失
|
||||||
MapConroler._instance.pause = true;
|
MapConroler._instance.pause = true;
|
||||||
if (MapConroler._instance.ishammer == true) {
|
if (MapConroler._instance.ishammer == true) {
|
||||||
|
@ -808,10 +812,10 @@ export default class Block extends cc.Component {
|
||||||
this.node.getChildByName("lock").getComponent("Lock").reduce();
|
this.node.getChildByName("lock").getComponent("Lock").reduce();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}, 1800);
|
}, 1200);
|
||||||
}
|
}
|
||||||
if (MapConroler._instance.ismagic) {
|
if (MapConroler._instance.ismagic) {
|
||||||
setTimeout(() => {
|
this.scheduleCallback = setTimeout(() => {
|
||||||
// 记录添加magic时的锚点
|
// 记录添加magic时的锚点
|
||||||
this.node.anchorX = 0.5;
|
this.node.anchorX = 0.5;
|
||||||
this.node.anchorY = 0.5;
|
this.node.anchorY = 0.5;
|
||||||
|
@ -868,7 +872,14 @@ export default class Block extends cc.Component {
|
||||||
this.node.getChildByName("lock").getComponent("Lock").reduce();
|
this.node.getChildByName("lock").getComponent("Lock").reduce();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}, 600);
|
}, 800);
|
||||||
|
// this.scheduleCallback = setTimeout(() => {
|
||||||
|
// function ()
|
||||||
|
// }, timeout); {
|
||||||
|
|
||||||
|
// };
|
||||||
|
// this.stopTimeCutDown();
|
||||||
|
// this.schedule(this.scheduleCallback, 0.6);
|
||||||
console.log("111")
|
console.log("111")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -890,7 +901,7 @@ export default class Block extends cc.Component {
|
||||||
tim = time2
|
tim = time2
|
||||||
}
|
}
|
||||||
if (MapConroler._instance.hammer == true) MapConroler._instance.hammer = false;
|
if (MapConroler._instance.hammer == true) MapConroler._instance.hammer = false;
|
||||||
setTimeout(() => {
|
this.scheduleCallback2= setTimeout(() => {
|
||||||
//如果方块可以消除
|
//如果方块可以消除
|
||||||
MapConroler._instance.blockNum -= 1;
|
MapConroler._instance.blockNum -= 1;
|
||||||
MapConroler._instance.special_Treatment(this.node);
|
MapConroler._instance.special_Treatment(this.node);
|
||||||
|
@ -925,7 +936,12 @@ export default class Block extends cc.Component {
|
||||||
}, tim);
|
}, tim);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
stopTimeCutDown() {
|
||||||
|
if (this.scheduleCallback) {
|
||||||
|
this.unschedule(this.scheduleCallback);
|
||||||
|
this.scheduleCallback = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
setVibrate(type, count) {
|
setVibrate(type, count) {
|
||||||
// return;
|
// return;
|
||||||
// console.log("最新:",cc.fx.GameConfig.GM_INFO.vibrateOpen,type);
|
// console.log("最新:",cc.fx.GameConfig.GM_INFO.vibrateOpen,type);
|
||||||
|
|
|
@ -1888,6 +1888,7 @@ export default class MapConroler extends cc.Component {
|
||||||
stopTimeCutDown() {
|
stopTimeCutDown() {
|
||||||
if (this.scheduleCallback) {
|
if (this.scheduleCallback) {
|
||||||
this.unschedule(this.scheduleCallback);
|
this.unschedule(this.scheduleCallback);
|
||||||
|
this.scheduleCallback = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
5054
assets/prefab/map/Pause.prefab
Normal file
5054
assets/prefab/map/Pause.prefab
Normal file
File diff suppressed because it is too large
Load Diff
9
assets/prefab/map/Pause.prefab.meta
Normal file
9
assets/prefab/map/Pause.prefab.meta
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
"ver": "1.3.2",
|
||||||
|
"uuid": "625b0784-d5f1-4e52-9258-6ffa083fd973",
|
||||||
|
"importer": "prefab",
|
||||||
|
"optimizationPolicy": "AUTO",
|
||||||
|
"asyncLoadAssets": false,
|
||||||
|
"readonly": false,
|
||||||
|
"subMetas": {}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user