修复BUG
This commit is contained in:
parent
9d8ad6307c
commit
7fa2297b81
|
@ -2065,9 +2065,9 @@ export default class MapConroler extends cc.Component {
|
|||
|
||||
//使用时间道具
|
||||
useTimeProp() {
|
||||
|
||||
|
||||
if (this.node.parent.getChildByName("Ice").active == true || this.timeNumber <= 1 || this.gameOver || this.gameWin) {
|
||||
var pause = this.iceTrue();
|
||||
console.log("冰冻状态:", pause);
|
||||
if (pause == true) {
|
||||
return;
|
||||
}
|
||||
let freezeBtn = this.node.parent.getChildByName("Bottom").getChildByName("timeBtn");
|
||||
|
@ -2158,8 +2158,12 @@ export default class MapConroler extends cc.Component {
|
|||
handleBuySuccess(data) {
|
||||
this.node.parent.parent.parent.getComponent("SceneManager").resetBtn();
|
||||
this.updateCoin();
|
||||
this.pause = false;
|
||||
this.startBoom();
|
||||
var pause = this.iceTrue();
|
||||
if (pause == false) {
|
||||
this.pause = false;
|
||||
this.startBoom();
|
||||
}
|
||||
|
||||
const timestamp = Date.now();
|
||||
// console.log("回调函数内:",this.pause);
|
||||
let freezeBtn = this.node.parent.getChildByName("Bottom").getChildByName("timeBtn");
|
||||
|
@ -3274,6 +3278,15 @@ export default class MapConroler extends cc.Component {
|
|||
}
|
||||
}
|
||||
|
||||
iceTrue() {
|
||||
if (this.node.parent.getChildByName("Ice").active == true || this.timeNumber <= 1 || this.gameOver || this.gameWin) {
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
update(dt) {
|
||||
|
|
|
@ -315,7 +315,8 @@ export default class SceneManager extends cc.Component {
|
|||
cc.fx.AudioManager._instance.playEffect("anniu_little", null);
|
||||
this.pause.getComponent("btnControl").setTouch(true);
|
||||
this.node.getChildByName("Pause").active = false;
|
||||
if (MapConroler._instance.node.parent.getChildByName("Ice").active == false) {
|
||||
var pause = MapConroler._instance.iceTrue();
|
||||
if (pause == false) {
|
||||
MapConroler._instance.pause = false;
|
||||
MapConroler._instance.startBoom();
|
||||
}
|
||||
|
@ -418,8 +419,12 @@ export default class SceneManager extends cc.Component {
|
|||
|
||||
|
||||
closePropBuy() {
|
||||
MapConroler._instance.pause = false;
|
||||
MapConroler._instance.startBoom();
|
||||
var pause = MapConroler._instance.iceTrue();
|
||||
if (pause == false) {
|
||||
MapConroler._instance.pause = false;
|
||||
MapConroler._instance.startBoom();
|
||||
}
|
||||
|
||||
let freezeBtn = MapConroler._instance.node.parent.getChildByName("Bottom").getChildByName("timeBtn");
|
||||
let hammerBtn = MapConroler._instance.node.parent.getChildByName("Bottom").getChildByName("destroyBtn");
|
||||
let magicBtn = MapConroler._instance.node.parent.getChildByName("Bottom").getChildByName("magicBtn");
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
"premultiplyAlpha": false,
|
||||
"genMipmaps": false,
|
||||
"packable": true,
|
||||
"width": 1966,
|
||||
"height": 922,
|
||||
"width": 2008,
|
||||
"height": 938,
|
||||
"platformSettings": {},
|
||||
"subMetas": {}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -62,6 +62,10 @@ export default class NewClass extends cc.Component {
|
|||
}
|
||||
|
||||
init() {
|
||||
let flag = cc.fx.GameTool.getSetScreenResolutionFlag();
|
||||
if (flag) {
|
||||
this.node.getChildByName("itemcontent").getChildByName("view").height = 1500;
|
||||
}
|
||||
this.onShowListener = null;
|
||||
if (cc.sys.platform === cc.sys.WECHAT_GAME) {
|
||||
// 定义监听函数
|
||||
|
@ -616,8 +620,15 @@ export default class NewClass extends cc.Component {
|
|||
|
||||
//无限体力刷新功能
|
||||
updatePower() {
|
||||
console.log("无限体力时间戳:", cc.fx.GameConfig.GM_INFO.userPowerTime)
|
||||
MapConroler._instance.setPropNum();
|
||||
console.log("无限体力时间戳:", cc.fx.GameConfig.GM_INFO.userPowerTime);
|
||||
const winCOIN = cc.find("Canvas"); // 假设 Canvas 节点
|
||||
if (winCOIN) {
|
||||
const wincoin = winCOIN.getComponent(SceneManager);
|
||||
if (wincoin) {
|
||||
MapConroler._instance.setPropNum();
|
||||
console.log("局内");
|
||||
};
|
||||
}
|
||||
if (cc.fx.GameConfig.GM_INFO.userPowerTime != 0) {
|
||||
let nowTime = Math.floor(Date.now() / 1000);
|
||||
if (cc.fx.GameConfig.GM_INFO.userPowerTime > nowTime) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user