Compare commits

...

2 Commits

Author SHA1 Message Date
YZ\249929363 1f0db6c4a9 Merge branch 'main' of https://git.sparkus.cn/yangzhao/cb 2025-07-02 10:58:31 +08:00
YZ\249929363 96ec9d395d 修复一点BUG,恢复地图底图, 增加按钮重复点击控制 2025-07-02 10:58:25 +08:00
6 changed files with 492 additions and 420 deletions

File diff suppressed because it is too large Load Diff

View File

@ -79,6 +79,7 @@ export default class MapConroler extends cc.Component {
mapHeight: number = 0; mapHeight: number = 0;
wallNum: number = 0; wallNum: number = 0;
blockNum: number = 0; blockNum: number = 0;
reviewState: boolean = false;
mapBlocksWall: any; //地图的所有底块 mapBlocksWall: any; //地图的所有底块
mapInfo: any; //地图除了底块的其他信息 mapInfo: any; //地图除了底块的其他信息
blocks: any; //方块数组 blocks: any; //方块数组
@ -135,6 +136,7 @@ export default class MapConroler extends cc.Component {
this.gameWin = false; this.gameWin = false;
this.gameOver = false; this.gameOver = false;
this.gameStart = false; this.gameStart = false;
this.reviewState = false;
this.homeCanTouch = true; this.homeCanTouch = true;
this.againCanTouch = true; this.againCanTouch = true;
this.new_mode = 0; this.new_mode = 0;
@ -1314,6 +1316,12 @@ export default class MapConroler extends cc.Component {
} }
winLevel() { winLevel() {
if(this.node.parent.parent.getChildByName("Win").
getChildByName("nextBtn").getComponent("btnControl")._touch == false){
return;
}
this.node.parent.parent.getChildByName("Win").
getChildByName("nextBtn").getComponent("btnControl").setTouch(false);
cc.fx.AudioManager._instance.playEffect("anniu_Big", null); cc.fx.AudioManager._instance.playEffect("anniu_Big", null);
if (cc.fx.GameConfig.GM_INFO.level > 156) { if (cc.fx.GameConfig.GM_INFO.level > 156) {
cc.fx.GameConfig.GM_INFO.level = 156; cc.fx.GameConfig.GM_INFO.level = 156;
@ -1402,6 +1410,10 @@ export default class MapConroler extends cc.Component {
} }
reviewLevel() { reviewLevel() {
if(this.reviewState == true){
return;
}
this.reviewState = true;
cc.fx.AudioManager._instance.playEffect("anniu_Big", null); cc.fx.AudioManager._instance.playEffect("anniu_Big", null);
let coin = 900; let coin = 900;
if (cc.fx.GameConfig.GM_INFO.review == 1) coin = 1900; if (cc.fx.GameConfig.GM_INFO.review == 1) coin = 1900;
@ -1409,6 +1421,7 @@ export default class MapConroler extends cc.Component {
// console.log("自身金币:",cc.fx.GameConfig.GM_INFO.coin,"消耗金币:",coin); // console.log("自身金币:",cc.fx.GameConfig.GM_INFO.coin,"消耗金币:",coin);
if (cc.fx.GameConfig.GM_INFO.coin < Math.abs(coin)) { if (cc.fx.GameConfig.GM_INFO.coin < Math.abs(coin)) {
MiniGameSdk.API.showToast("金币不足,无法加时间"); MiniGameSdk.API.showToast("金币不足,无法加时间");
this.reviewState = false;
return; return;
} }
else { else {
@ -1429,6 +1442,9 @@ export default class MapConroler extends cc.Component {
this.add_Time += 20; this.add_Time += 20;
this.pause = false; this.pause = false;
this.node.parent.parent.getChildByName("Lose").active = false; this.node.parent.parent.getChildByName("Lose").active = false;
setTimeout(() => {
this.reviewState = false;
}, 200);
this.startTimeCutDown(); this.startTimeCutDown();
} }
@ -1463,7 +1479,7 @@ export default class MapConroler extends cc.Component {
return; return;
} }
// MiniGameSdk.API.showToast("体力值减少"); // MiniGameSdk.API.showToast("体力值减少");
// MapConroler._instance = null; MapConroler._instance = null;
cc.fx.GameConfig.LEVEL_INFO_init(false, 0); cc.fx.GameConfig.LEVEL_INFO_init(false, 0);
if (this.new_mode == 3) { if (this.new_mode == 3) {
this.node.parent.parent.getChildByName("Win").active = false; this.node.parent.parent.getChildByName("Win").active = false;

View File

@ -314,7 +314,9 @@
], ],
"_srcBlendFactor": 770, "_srcBlendFactor": 770,
"_dstBlendFactor": 771, "_dstBlendFactor": 771,
"_spriteFrame": null, "_spriteFrame": {
"__uuid__": "a4e3a13a-44b8-4fc2-9b34-e72554a59deb"
},
"_type": 0, "_type": 0,
"_sizeMode": 1, "_sizeMode": 1,
"_fillType": 0, "_fillType": 0,
@ -326,7 +328,9 @@
"_fillStart": 0, "_fillStart": 0,
"_fillRange": 0, "_fillRange": 0,
"_isTrimmedMode": true, "_isTrimmedMode": true,
"_atlas": null, "_atlas": {
"__uuid__": "d2adfa00-68ea-4d63-97a0-44fca153a2d7"
},
"_id": "" "_id": ""
}, },
{ {

25
project.config.json Normal file
View File

@ -0,0 +1,25 @@
{
"setting": {
"es6": true,
"postcss": true,
"minified": true,
"uglifyFileName": false,
"enhance": true,
"packNpmRelationList": [],
"babelSetting": {
"ignore": [],
"disablePlugins": [],
"outputPath": ""
},
"useCompilerPlugins": false
},
"compileType": "game",
"simulatorPluginLibVersion": {},
"packOptions": {
"ignore": [],
"include": []
},
"isGameTourist": false,
"appid": "wxdd145ced49158a1e",
"editorSetting": {}
}

View File

@ -0,0 +1,14 @@
{
"libVersion": "3.8.10",
"projectname": "colorBlcok",
"setting": {
"urlCheck": true,
"coverView": true,
"lazyloadPlaceholderEnable": false,
"skylineRenderEnable": false,
"preloadBackgroundData": false,
"autoAudits": false,
"showShadowRootInWxmlPanel": true,
"compileHotReLoad": true
}
}

View File

@ -12,7 +12,7 @@
"webOrientation": "portrait", "webOrientation": "portrait",
"inlineSpriteFrames": true, "inlineSpriteFrames": true,
"inlineSpriteFrames_native": true, "inlineSpriteFrames_native": true,
"mainCompressionType": "default", "mainCompressionType": "subpackage",
"mainIsRemote": false, "mainIsRemote": false,
"optimizeHotUpdate": false, "optimizeHotUpdate": false,
"md5Cache": true, "md5Cache": true,