diff --git a/assets/Script/Map.ts b/assets/Script/Map.ts index 098093e..31cb4eb 100644 --- a/assets/Script/Map.ts +++ b/assets/Script/Map.ts @@ -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) { diff --git a/assets/Script/SceneManager.ts b/assets/Script/SceneManager.ts index 1034ab2..175acfc 100644 --- a/assets/Script/SceneManager.ts +++ b/assets/Script/SceneManager.ts @@ -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"); diff --git a/assets/shop/img/texture_atlas-1.png.meta b/assets/shop/img/texture_atlas-1.png.meta index 844c6a3..66a6d5a 100644 --- a/assets/shop/img/texture_atlas-1.png.meta +++ b/assets/shop/img/texture_atlas-1.png.meta @@ -8,8 +8,8 @@ "premultiplyAlpha": false, "genMipmaps": false, "packable": true, - "width": 1966, - "height": 922, + "width": 2008, + "height": 938, "platformSettings": {}, "subMetas": {} } \ No newline at end of file diff --git a/assets/shop/prefab/shop.prefab b/assets/shop/prefab/shop.prefab index bb7d463..a994cad 100644 --- a/assets/shop/prefab/shop.prefab +++ b/assets/shop/prefab/shop.prefab @@ -27,29 +27,29 @@ "__id__": 11 }, { - "__id__": 346 + "__id__": 352 }, { - "__id__": 419 + "__id__": 425 }, { - "__id__": 422 + "__id__": 428 }, { - "__id__": 430 + "__id__": 436 } ], "_active": true, "_components": [ { - "__id__": 443 + "__id__": 449 }, { - "__id__": 444 + "__id__": 450 } ], "_prefab": { - "__id__": 445 + "__id__": 451 }, "_opacity": 255, "_color": { @@ -408,11 +408,11 @@ "__id__": 17 }, { - "__id__": 344 + "__id__": 350 } ], "_prefab": { - "__id__": 345 + "__id__": 351 }, "_opacity": 255, "_color": { @@ -479,11 +479,11 @@ "__id__": 16 }, { - "__id__": 342 + "__id__": 348 } ], "_prefab": { - "__id__": 343 + "__id__": 349 }, "_opacity": 255, "_color": { @@ -734,16 +734,22 @@ }, { "__id__": 200 + }, + { + "__id__": 340 + }, + { + "__id__": 343 } ], "_active": true, "_components": [ { - "__id__": 340 + "__id__": 346 } ], "_prefab": { - "__id__": 341 + "__id__": 347 }, "_opacity": 255, "_color": { @@ -756,7 +762,7 @@ "_contentSize": { "__type__": "cc.Size", "width": 1080, - "height": 3200 + "height": 3300 }, "_anchorPoint": { "__type__": "cc.Vec2", @@ -836,7 +842,7 @@ "ctor": "Float64Array", "array": [ 0, - 885.733, + 944.512, 0, 0, 0, @@ -944,7 +950,7 @@ "ctor": "Float64Array", "array": [ 0, - -272.119, + -327.441, 0, 0, 0, @@ -2102,7 +2108,7 @@ "ctor": "Float64Array", "array": [ -2.798, - -583.15, + -638.472, 0, 0, 0, @@ -2339,7 +2345,7 @@ "ctor": "Float64Array", "array": [ -339.058, - -909.459, + -964.781, 0, 0, 0, @@ -2923,7 +2929,7 @@ "ctor": "Float64Array", "array": [ 12.942, - -909.459, + -964.781, 0, 0, 0, @@ -3507,7 +3513,7 @@ "ctor": "Float64Array", "array": [ 364.942, - -909.459, + -964.781, 0, 0, 0, @@ -4091,7 +4097,7 @@ "ctor": "Float64Array", "array": [ -339.058, - -1403.459, + -1458.781, 0, 0, 0, @@ -4675,7 +4681,7 @@ "ctor": "Float64Array", "array": [ 12.942, - -1403.459, + -1458.781, 0, 0, 0, @@ -5259,7 +5265,7 @@ "ctor": "Float64Array", "array": [ 364.942, - -1403.459, + -1458.781, 0, 0, 0, @@ -5828,7 +5834,7 @@ "ctor": "Float64Array", "array": [ 0.491, - -1720.444, + -1775.766, 0, 0, 0, @@ -6050,7 +6056,7 @@ "ctor": "Float64Array", "array": [ 0, - -2029.915, + -2085.237, 0, 0, 0, @@ -6495,7 +6501,7 @@ "ctor": "Float64Array", "array": [ -2.3, - -2499.362, + -2554.684, 0, 0, 0, @@ -7052,7 +7058,7 @@ "ctor": "Float64Array", "array": [ -1.476, - -2971.567, + -3026.889, 0, 0, 0, @@ -7565,7 +7571,7 @@ "ctor": "Float64Array", "array": [ 0, - 18.339, + -36.983, 0, 0, 0, @@ -12717,6 +12723,220 @@ "fileId": "30fqx3mL9Ca5ge8/bE3jKS", "sync": false }, + { + "__type__": "cc.Node", + "_name": "New Sprite(Splash)", + "_objFlags": 0, + "_parent": { + "__id__": 18 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 341 + } + ], + "_prefab": { + "__id__": 342 + }, + "_opacity": 0, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 500, + "height": 500 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + -3550.469, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 340 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91" + }, + "_type": 0, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "2e5x9A8QFML6pW6rjKfGXH", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "New Sprite(Splash)", + "_objFlags": 0, + "_parent": { + "__id__": 18 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 344 + } + ], + "_prefab": { + "__id__": 345 + }, + "_opacity": 0, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 400, + "height": 400 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + -4028.521, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 343 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91" + }, + "_type": 0, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "f6lUFFE5VOZr7YPoYnwgu9", + "sync": false + }, { "__type__": "cc.Layout", "_name": "", @@ -12847,32 +13067,32 @@ }, "_children": [ { - "__id__": 347 + "__id__": 353 }, { - "__id__": 351 - }, - { - "__id__": 355 + "__id__": 357 }, { "__id__": 361 }, { - "__id__": 398 + "__id__": 367 }, { - "__id__": 411 + "__id__": 404 + }, + { + "__id__": 417 } ], "_active": true, "_components": [ { - "__id__": 417 + "__id__": 423 } ], "_prefab": { - "__id__": 418 + "__id__": 424 }, "_opacity": 255, "_color": { @@ -12926,20 +13146,20 @@ "_name": "shop_1", "_objFlags": 0, "_parent": { - "__id__": 346 + "__id__": 352 }, "_children": [], "_active": true, "_components": [ { - "__id__": 348 + "__id__": 354 }, { - "__id__": 349 + "__id__": 355 } ], "_prefab": { - "__id__": 350 + "__id__": 356 }, "_opacity": 255, "_color": { @@ -12993,7 +13213,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 347 + "__id__": 353 }, "_enabled": true, "_materials": [ @@ -13025,7 +13245,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 347 + "__id__": 353 }, "_enabled": true, "alignMode": 1, @@ -13065,20 +13285,20 @@ "_name": "shop_1", "_objFlags": 0, "_parent": { - "__id__": 346 + "__id__": 352 }, "_children": [], "_active": true, "_components": [ { - "__id__": 352 + "__id__": 358 }, { - "__id__": 353 + "__id__": 359 } ], "_prefab": { - "__id__": 354 + "__id__": 360 }, "_opacity": 255, "_color": { @@ -13132,7 +13352,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 351 + "__id__": 357 }, "_enabled": true, "_materials": [ @@ -13164,7 +13384,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 351 + "__id__": 357 }, "_enabled": true, "alignMode": 1, @@ -13204,21 +13424,21 @@ "_name": "tx", "_objFlags": 0, "_parent": { - "__id__": 346 + "__id__": 352 }, "_children": [ { - "__id__": 356 + "__id__": 362 } ], "_active": true, "_components": [ { - "__id__": 359 + "__id__": 365 } ], "_prefab": { - "__id__": 360 + "__id__": 366 }, "_opacity": 255, "_color": { @@ -13272,17 +13492,17 @@ "_name": "icon", "_objFlags": 0, "_parent": { - "__id__": 355 + "__id__": 361 }, "_children": [], "_active": true, "_components": [ { - "__id__": 357 + "__id__": 363 } ], "_prefab": { - "__id__": 358 + "__id__": 364 }, "_opacity": 255, "_color": { @@ -13336,7 +13556,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 356 + "__id__": 362 }, "_enabled": true, "_materials": [ @@ -13379,7 +13599,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 355 + "__id__": 361 }, "_enabled": true, "_materials": [ @@ -13424,15 +13644,9 @@ "_name": "Stamina", "_objFlags": 0, "_parent": { - "__id__": 346 + "__id__": 352 }, "_children": [ - { - "__id__": 362 - }, - { - "__id__": 365 - }, { "__id__": 368 }, @@ -13443,20 +13657,26 @@ "__id__": 374 }, { - "__id__": 376 + "__id__": 377 }, { - "__id__": 379 + "__id__": 380 + }, + { + "__id__": 382 + }, + { + "__id__": 385 } ], "_active": true, "_components": [ { - "__id__": 395 + "__id__": 401 } ], "_prefab": { - "__id__": 397 + "__id__": 403 }, "_opacity": 255, "_color": { @@ -13510,17 +13730,17 @@ "_name": "New Sprite", "_objFlags": 0, "_parent": { - "__id__": 361 + "__id__": 367 }, "_children": [], "_active": true, "_components": [ { - "__id__": 363 + "__id__": 369 } ], "_prefab": { - "__id__": 364 + "__id__": 370 }, "_opacity": 255, "_color": { @@ -13574,7 +13794,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 362 + "__id__": 368 }, "_enabled": true, "_materials": [ @@ -13619,17 +13839,17 @@ "_name": "New Sprite", "_objFlags": 0, "_parent": { - "__id__": 361 + "__id__": 367 }, "_children": [], "_active": true, "_components": [ { - "__id__": 366 + "__id__": 372 } ], "_prefab": { - "__id__": 367 + "__id__": 373 }, "_opacity": 255, "_color": { @@ -13683,7 +13903,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 365 + "__id__": 371 }, "_enabled": true, "_materials": [ @@ -13728,17 +13948,17 @@ "_name": "New Sprite", "_objFlags": 0, "_parent": { - "__id__": 361 + "__id__": 367 }, "_children": [], "_active": false, "_components": [ { - "__id__": 369 + "__id__": 375 } ], "_prefab": { - "__id__": 370 + "__id__": 376 }, "_opacity": 255, "_color": { @@ -13792,7 +14012,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 368 + "__id__": 374 }, "_enabled": true, "_materials": [ @@ -13837,17 +14057,17 @@ "_name": "man", "_objFlags": 0, "_parent": { - "__id__": 361 + "__id__": 367 }, "_children": [], "_active": false, "_components": [ { - "__id__": 372 + "__id__": 378 } ], "_prefab": { - "__id__": 373 + "__id__": 379 }, "_opacity": 255, "_color": { @@ -13901,7 +14121,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 371 + "__id__": 377 }, "_enabled": true, "_materials": [ @@ -13946,13 +14166,13 @@ "_name": "health", "_objFlags": 0, "_parent": { - "__id__": 361 + "__id__": 367 }, "_children": [], "_active": true, "_components": [], "_prefab": { - "__id__": 375 + "__id__": 381 }, "_opacity": 255, "_color": { @@ -14017,17 +14237,17 @@ "_name": "time", "_objFlags": 0, "_parent": { - "__id__": 361 + "__id__": 367 }, "_children": [], "_active": false, "_components": [ { - "__id__": 377 + "__id__": 383 } ], "_prefab": { - "__id__": 378 + "__id__": 384 }, "_opacity": 255, "_color": { @@ -14081,7 +14301,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 376 + "__id__": 382 }, "_enabled": true, "_materials": [ @@ -14125,23 +14345,23 @@ "_name": "skyLine", "_objFlags": 0, "_parent": { - "__id__": 361 + "__id__": 367 }, "_children": [ - { - "__id__": 380 - }, - { - "__id__": 383 - }, { "__id__": 386 + }, + { + "__id__": 389 + }, + { + "__id__": 392 } ], "_active": false, "_components": [], "_prefab": { - "__id__": 394 + "__id__": 400 }, "_opacity": 255, "_color": { @@ -14195,17 +14415,17 @@ "_name": "New Sprite", "_objFlags": 0, "_parent": { - "__id__": 379 + "__id__": 385 }, "_children": [], "_active": true, "_components": [ { - "__id__": 381 + "__id__": 387 } ], "_prefab": { - "__id__": 382 + "__id__": 388 }, "_opacity": 255, "_color": { @@ -14259,7 +14479,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 380 + "__id__": 386 }, "_enabled": true, "_materials": [ @@ -14302,17 +14522,17 @@ "_name": "skyTime", "_objFlags": 0, "_parent": { - "__id__": 379 + "__id__": 385 }, "_children": [], "_active": true, "_components": [ { - "__id__": 384 + "__id__": 390 } ], "_prefab": { - "__id__": 385 + "__id__": 391 }, "_opacity": 255, "_color": { @@ -14366,7 +14586,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 383 + "__id__": 389 }, "_enabled": true, "_materials": [ @@ -14410,20 +14630,20 @@ "_name": "up", "_objFlags": 0, "_parent": { - "__id__": 379 + "__id__": 385 }, "_children": [ { - "__id__": 387 + "__id__": 393 }, { - "__id__": 390 + "__id__": 396 } ], "_active": true, "_components": [], "_prefab": { - "__id__": 393 + "__id__": 399 }, "_opacity": 255, "_color": { @@ -14477,17 +14697,17 @@ "_name": "tili", "_objFlags": 0, "_parent": { - "__id__": 386 + "__id__": 392 }, "_children": [], "_active": true, "_components": [ { - "__id__": 388 + "__id__": 394 } ], "_prefab": { - "__id__": 389 + "__id__": 395 }, "_opacity": 255, "_color": { @@ -14541,7 +14761,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 387 + "__id__": 393 }, "_enabled": true, "_materials": [ @@ -14594,17 +14814,17 @@ "_name": "light", "_objFlags": 0, "_parent": { - "__id__": 386 + "__id__": 392 }, "_children": [], "_active": true, "_components": [ { - "__id__": 391 + "__id__": 397 } ], "_prefab": { - "__id__": 392 + "__id__": 398 }, "_opacity": 255, "_color": { @@ -14658,7 +14878,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 390 + "__id__": 396 }, "_enabled": true, "_materials": [ @@ -14733,7 +14953,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 361 + "__id__": 367 }, "_enabled": false, "_normalMaterial": null, @@ -14742,7 +14962,7 @@ "zoomScale": 1.1, "clickEvents": [ { - "__id__": 396 + "__id__": 402 } ], "_N$interactable": true, @@ -14824,26 +15044,26 @@ "_name": "Coin", "_objFlags": 0, "_parent": { - "__id__": 346 + "__id__": 352 }, "_children": [ - { - "__id__": 399 - }, - { - "__id__": 402 - }, { "__id__": 405 }, { "__id__": 408 + }, + { + "__id__": 411 + }, + { + "__id__": 414 } ], "_active": true, "_components": [], "_prefab": { - "__id__": 410 + "__id__": 416 }, "_opacity": 255, "_color": { @@ -14897,17 +15117,17 @@ "_name": "New Sprite", "_objFlags": 0, "_parent": { - "__id__": 398 + "__id__": 404 }, "_children": [], "_active": true, "_components": [ { - "__id__": 400 + "__id__": 406 } ], "_prefab": { - "__id__": 401 + "__id__": 407 }, "_opacity": 255, "_color": { @@ -14961,7 +15181,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 399 + "__id__": 405 }, "_enabled": true, "_materials": [ @@ -15006,17 +15226,17 @@ "_name": "New Sprite", "_objFlags": 0, "_parent": { - "__id__": 398 + "__id__": 404 }, "_children": [], "_active": true, "_components": [ { - "__id__": 403 + "__id__": 409 } ], "_prefab": { - "__id__": 404 + "__id__": 410 }, "_opacity": 255, "_color": { @@ -15070,7 +15290,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 402 + "__id__": 408 }, "_enabled": true, "_materials": [ @@ -15115,17 +15335,17 @@ "_name": "New Sprite", "_objFlags": 0, "_parent": { - "__id__": 398 + "__id__": 404 }, "_children": [], "_active": false, "_components": [ { - "__id__": 406 + "__id__": 412 } ], "_prefab": { - "__id__": 407 + "__id__": 413 }, "_opacity": 255, "_color": { @@ -15179,7 +15399,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 405 + "__id__": 411 }, "_enabled": true, "_materials": [ @@ -15224,13 +15444,13 @@ "_name": "Coin", "_objFlags": 0, "_parent": { - "__id__": 398 + "__id__": 404 }, "_children": [], "_active": true, "_components": [], "_prefab": { - "__id__": 409 + "__id__": 415 }, "_opacity": 255, "_color": { @@ -15306,23 +15526,23 @@ "_name": "btn1", "_objFlags": 0, "_parent": { - "__id__": 346 + "__id__": 352 }, "_children": [], "_active": true, "_components": [ { - "__id__": 412 + "__id__": 418 }, { - "__id__": 413 + "__id__": 419 }, { - "__id__": 414 + "__id__": 420 } ], "_prefab": { - "__id__": 416 + "__id__": 422 }, "_opacity": 255, "_color": { @@ -15376,7 +15596,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 411 + "__id__": 417 }, "_enabled": true, "_materials": [ @@ -15410,7 +15630,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 411 + "__id__": 417 }, "_enabled": true, "alignMode": 1, @@ -15439,7 +15659,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 411 + "__id__": 417 }, "_enabled": true, "_normalMaterial": null, @@ -15448,7 +15668,7 @@ "zoomScale": 1.2, "clickEvents": [ { - "__id__": 415 + "__id__": 421 } ], "_N$interactable": true, @@ -15504,7 +15724,7 @@ "hoverSprite": null, "_N$disabledSprite": null, "_N$target": { - "__id__": 411 + "__id__": 417 }, "_id": "" }, @@ -15534,7 +15754,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 346 + "__id__": 352 }, "_enabled": true, "alignMode": 1, @@ -15580,11 +15800,11 @@ "_active": false, "_components": [ { - "__id__": 420 + "__id__": 426 } ], "_prefab": { - "__id__": 421 + "__id__": 427 }, "_opacity": 255, "_color": { @@ -15638,7 +15858,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 419 + "__id__": 425 }, "_enabled": true, "_materials": [ @@ -15695,17 +15915,17 @@ }, "_children": [ { - "__id__": 423 + "__id__": 429 } ], "_active": false, "_components": [ { - "__id__": 427 + "__id__": 433 } ], "_prefab": { - "__id__": 429 + "__id__": 435 }, "_opacity": 255, "_color": { @@ -15759,20 +15979,20 @@ "_name": "Background", "_objFlags": 512, "_parent": { - "__id__": 422 + "__id__": 428 }, "_children": [], "_active": true, "_components": [ { - "__id__": 424 + "__id__": 430 }, { - "__id__": 425 + "__id__": 431 } ], "_prefab": { - "__id__": 426 + "__id__": 432 }, "_opacity": 255, "_color": { @@ -15826,7 +16046,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 423 + "__id__": 429 }, "_enabled": true, "_materials": [ @@ -15860,7 +16080,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 423 + "__id__": 429 }, "_enabled": true, "alignMode": 0, @@ -15898,7 +16118,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 422 + "__id__": 428 }, "_enabled": true, "_normalMaterial": null, @@ -15907,7 +16127,7 @@ "zoomScale": 1.2, "clickEvents": [ { - "__id__": 428 + "__id__": 434 } ], "_N$interactable": true, @@ -15975,7 +16195,7 @@ "__uuid__": "29158224-f8dd-4661-a796-1ffab537140e" }, "_N$target": { - "__id__": 423 + "__id__": 429 }, "_id": "" }, @@ -16009,23 +16229,23 @@ }, "_children": [ { - "__id__": 431 + "__id__": 437 }, { - "__id__": 435 + "__id__": 441 }, { - "__id__": 438 + "__id__": 444 } ], "_active": false, "_components": [ { - "__id__": 441 + "__id__": 447 } ], "_prefab": { - "__id__": 442 + "__id__": 448 }, "_opacity": 255, "_color": { @@ -16079,20 +16299,20 @@ "_name": "New Sprite(Splash)", "_objFlags": 0, "_parent": { - "__id__": 430 + "__id__": 436 }, "_children": [], "_active": true, "_components": [ { - "__id__": 432 + "__id__": 438 }, { - "__id__": 433 + "__id__": 439 } ], "_prefab": { - "__id__": 434 + "__id__": 440 }, "_opacity": 120, "_color": { @@ -16146,7 +16366,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 431 + "__id__": 437 }, "_enabled": true, "_materials": [ @@ -16178,7 +16398,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 431 + "__id__": 437 }, "_enabled": true, "_id": "" @@ -16199,17 +16419,17 @@ "_name": "load", "_objFlags": 0, "_parent": { - "__id__": 430 + "__id__": 436 }, "_children": [], "_active": true, "_components": [ { - "__id__": 436 + "__id__": 442 } ], "_prefab": { - "__id__": 437 + "__id__": 443 }, "_opacity": 255, "_color": { @@ -16263,7 +16483,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 435 + "__id__": 441 }, "_enabled": true, "_materials": [ @@ -16306,17 +16526,17 @@ "_name": "New Label", "_objFlags": 0, "_parent": { - "__id__": 430 + "__id__": 436 }, "_children": [], "_active": true, "_components": [ { - "__id__": 439 + "__id__": 445 } ], "_prefab": { - "__id__": 440 + "__id__": 446 }, "_opacity": 255, "_color": { @@ -16370,7 +16590,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 438 + "__id__": 444 }, "_enabled": true, "_materials": [ @@ -16414,7 +16634,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 430 + "__id__": 436 }, "_enabled": true, "alignMode": 1, @@ -16462,16 +16682,16 @@ "__id__": 18 }, "coin": { - "__id__": 408 + "__id__": 414 }, "Stamina": { - "__id__": 361 + "__id__": 367 }, "monthCardTime": { "__id__": 28 }, "coinAnim": { - "__id__": 419 + "__id__": 425 }, "_id": "" }, diff --git a/assets/shop/script/shop.ts b/assets/shop/script/shop.ts index b8c5b8a..3c27937 100644 --- a/assets/shop/script/shop.ts +++ b/assets/shop/script/shop.ts @@ -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) {