diff --git a/assets/Scene/HomeScene.fire b/assets/Scene/HomeScene.fire index ed7cdeb..b3694e1 100644 --- a/assets/Scene/HomeScene.fire +++ b/assets/Scene/HomeScene.fire @@ -2385,8 +2385,8 @@ }, "_contentSize": { "__type__": "cc.Size", - "width": 94, - "height": 90 + "width": 92, + "height": 88 }, "_anchorPoint": { "__type__": "cc.Vec2", @@ -2438,7 +2438,7 @@ "_srcBlendFactor": 770, "_dstBlendFactor": 771, "_spriteFrame": { - "__uuid__": "8470837f-e899-445f-b74c-ef594b344817" + "__uuid__": "d1fb07ef-8763-4e07-b38f-63071b2d0ee4" }, "_type": 0, "_sizeMode": 1, @@ -2451,9 +2451,7 @@ "_fillStart": 0, "_fillRange": 0, "_isTrimmedMode": true, - "_atlas": { - "__uuid__": "98eb2872-691f-4fc7-b827-c7f6dd98d242" - }, + "_atlas": null, "_id": "cdFSX2eQpLcoQo2xGNhbqy" }, { @@ -2628,9 +2626,9 @@ "_opacity": 0, "_color": { "__type__": "cc.Color", - "r": 109, - "g": 70, - "b": 70, + "r": 0, + "g": 0, + "b": 0, "a": 255 }, "_contentSize": { diff --git a/assets/Script/Block.ts b/assets/Script/Block.ts index 6e4aeec..26378bd 100644 --- a/assets/Script/Block.ts +++ b/assets/Script/Block.ts @@ -227,12 +227,7 @@ export default class Block extends cc.Component { this.node.x - this.block_Info.node.x, this.node.y - this.block_Info.node.y ); - if (createAd) { - if (this.node.zIndex >= this.block_Info.node.zIndex) - this.createAdhesive(); - else - this.block_Info.node.getComponent("Block").createAdhesive(); - } + const targetNames = ['top', 'down', 'left', 'right']; this.block_Info.node.children.forEach(child => { if (child instanceof cc.Node && targetNames.includes(child.name) && child.getComponent("lq_collide").data_string != "-1") { @@ -248,7 +243,13 @@ export default class Block extends cc.Component { ); } }); - + if (createAd) { + this.block_Info.node.getComponent("Block").adhesive = cc.v2(-posOffset.x, -posOffset.y); + if (this.node.zIndex >= this.block_Info.node.zIndex) + this.createAdhesive(); + else + this.block_Info.node.getComponent("Block").createAdhesive(); + } this.adhesive = posOffset; } }, 100); @@ -620,13 +621,13 @@ export default class Block extends cc.Component { this.node.x = mapBlock.x + 65; this.node.y = mapBlock.y - 60; - if (this.type == 9) { - if (this.block_Info.node) { - this.block_Info.node.x = this.node.x - this.adhesive.x; - this.block_Info.node.y = this.node.y - this.adhesive.y; - } - } - else if (this.type == 1) { + // if (this.type == 9) { + // if (this.block_Info.node) { + // this.block_Info.node.x = this.node.x - this.adhesive.x; + // this.block_Info.node.y = this.node.y - this.adhesive.y; + // } + // } + if (this.type == 1) { this.block_Info.node.getComponent("Block").moveStack = false; this.block_Info.node.x = this.node.x + this.block_Info.node.getComponent("Block").stacking.x; this.block_Info.node.y = this.node.y + this.block_Info.node.getComponent("Block").stacking.y; diff --git a/assets/Script/module/Tool/GameTool.ts b/assets/Script/module/Tool/GameTool.ts index dc6f462..fb338b9 100644 --- a/assets/Script/module/Tool/GameTool.ts +++ b/assets/Script/module/Tool/GameTool.ts @@ -2008,6 +2008,14 @@ var GameTool = { cc.fx.StorageMessage.setStorage("Avatar", Avatar); return false; } + }, + + // 数字缩放动画,缩放后回归正常形态 改变后再放大 + numberScaleAction(node: cc.Node, scale = 1.2, duration = 0.2) { + node.scale = 1; + const scaleAction = cc.scaleTo(duration, scale).easing(cc.easeBackOut()); + const reverseAction = cc.scaleTo(duration, 1).easing(cc.easeBackIn()); + node.runAction(cc.sequence(scaleAction, reverseAction)); } }; export { GameTool }; \ No newline at end of file diff --git a/assets/Script/prop/Adhesive.ts b/assets/Script/prop/Adhesive.ts index 63d78b6..8be4392 100644 --- a/assets/Script/prop/Adhesive.ts +++ b/assets/Script/prop/Adhesive.ts @@ -69,6 +69,8 @@ export default class Adhesive extends cc.Component { this.lockTime--; NumberToImage.numberToImageNodes(this.lockTime, 20, 8, "time_", this.node.getChildByName("heng").getChildByName("num"), false); NumberToImage.numberToImageNodes(this.lockTime, 20, 8, "time_", this.node.getChildByName("shu").getChildByName("num"), false); + cc.fx.GameTool.numberScaleAction(this.node.getChildByName("heng").getChildByName("num")); + cc.fx.GameTool.numberScaleAction(this.node.getChildByName("shu").getChildByName("num")); if (this.lockTime == 0) { this.target.getComponent("Block").removeSpecailAdhesive(false); } diff --git a/assets/Script/prop/Boom.ts b/assets/Script/prop/Boom.ts index df8a791..020f8a6 100644 --- a/assets/Script/prop/Boom.ts +++ b/assets/Script/prop/Boom.ts @@ -31,7 +31,18 @@ export default class Boom extends cc.Component { init(time) { if (time) this.time = time; this.node.getChildByName("time").active = true; - NumberToImage.numberToImageNodes(this.time, 20, 8, "lock_", this.node.getChildByName("time"), false); + if (this.node.name == "boom") { + NumberToImage.numberToImageNodes(this.time, 20, 8, "lock_", this.node.getChildByName("time"), false); + } + else if (this.node.name == "boom2") { + NumberToImage.numberToImageNodes(this.time, 26, 8, "half_black_", this.node.getChildByName("time"), false); + if (this.node.getChildByName("time").children.length > 1) { + this.node.getChildByName("time").children[0].scale = 0.7; + this.node.getChildByName("time").children[1].scale = 0.7; + this.node.getChildByName("time").children[0].x -= 2; + this.node.getChildByName("time").children[0].x -= 3; + } + } // this.node.getChildByName("time").getComponent(cc.Label).string = this.time.toString(); } @@ -47,7 +58,14 @@ export default class Boom extends cc.Component { if (this.node.name == "boom2") { this.time -= num; if (this.time <= 0) this.time = 0; - NumberToImage.numberToImageNodes(this.time, 20, 8, "lock_", this.node.getChildByName("time"), false); + NumberToImage.numberToImageNodes(this.time, 30, 8, "half_black_", this.node.getChildByName("time"), false); + cc.fx.GameTool.numberScaleAction(this.node.getChildByName("time").children[0]); + if (this.node.getChildByName("time").children.length > 1) { + this.node.getChildByName("time").children[0].scale = 0.7; + this.node.getChildByName("time").children[1].scale = 0.7; + this.node.getChildByName("time").children[0].x -= 2; + this.node.getChildByName("time").children[0].x -= 3; + } if (this.time <= 0) { const mockTouchEvent = { getLocation: () => { @@ -110,7 +128,20 @@ export default class Boom extends cc.Component { } } this.time--; - NumberToImage.numberToImageNodes(this.time, 20, 8, "lock_", this.node.getChildByName("time"), false); + if (this.node.name == "boom") { + NumberToImage.numberToImageNodes(this.time, 20, 8, "lock_", this.node.getChildByName("time"), false); + if (this.time < 10) + cc.fx.GameTool.numberScaleAction(this.node.getChildByName("time")); + } + else if (this.node.name == "boom2") { + NumberToImage.numberToImageNodes(this.time, 30, 8, "half_black_", this.node.getChildByName("time"), false); + if (this.node.getChildByName("time").children.length > 1) { + this.node.getChildByName("time").children[0].scale = 0.7; + this.node.getChildByName("time").children[1].scale = 0.7; + this.node.getChildByName("time").children[0].x -= 2; + this.node.getChildByName("time").children[0].x -= 3; + } + } if (this.time <= 0) { // 创建模拟触摸事件对象 const mockTouchEvent = { diff --git a/assets/Script/prop/Floor.ts b/assets/Script/prop/Floor.ts index 247000c..c284cf2 100644 --- a/assets/Script/prop/Floor.ts +++ b/assets/Script/prop/Floor.ts @@ -46,6 +46,7 @@ export default class Floor extends cc.Component { this.time -= number; if (this.time <= 0) this.time = 0 NumberToImage.numberToImageNodes(this.time, 30, 15, "level_", this.node.getChildByName("time"), false); + cc.fx.GameTool.numberScaleAction(this.node.getChildByName("time")); // this.node.getChildByName("time").getComponent(cc.Label).string = this.time.toString(); if (this.time <= 0) { this.node.getChildByName("bingkuai").active = true; diff --git a/assets/Script/prop/Freeze.ts b/assets/Script/prop/Freeze.ts index 733c467..9288408 100644 --- a/assets/Script/prop/Freeze.ts +++ b/assets/Script/prop/Freeze.ts @@ -50,6 +50,7 @@ export default class Freeze extends cc.Component { this.time -= number; if (this.time <= 0) this.time = 0 NumberToImage.numberToImageNodes(this.time, 40, 25, "ice_", this.node.getChildByName("time"), false); + cc.fx.GameTool.numberScaleAction(this.node.getChildByName("time")); // this.node.getChildByName("time").getComponent(cc.Label).string = this.time.toString(); if (this.time <= 0) { this.node.getChildByName("bingkuai").active = true; diff --git a/assets/Script/prop/Key.ts b/assets/Script/prop/Key.ts index 8cdbc64..ff968ca 100644 --- a/assets/Script/prop/Key.ts +++ b/assets/Script/prop/Key.ts @@ -7,7 +7,7 @@ import MapConroler from "../Map"; -const {ccclass, property} = cc._decorator; +const { ccclass, property } = cc._decorator; @@ -18,25 +18,26 @@ export default class Key extends cc.Component { // mapInfo: number[][] = []; - onLoad () { + onLoad() { - } - - start () { } - init(time){ - if(time) this.time = time; + start() { + } + + init(time) { + if (time) this.time = time; this.node.getChildByName("time").active = true; this.node.getChildByName("time").getComponent(cc.Label).string = this.time.toString(); this.schedule(this.updateTime, 1); } - - updateTime(){ - this.time --; + + updateTime() { + this.time--; this.node.getChildByName("time").getComponent(cc.Label).string = this.time.toString(); - if(this.time <= 0){ + cc.fx.GameTool.numberScaleAction(this.node.getChildByName("time")); + if (this.time <= 0) { this.unschedule(this.updateTime); this.node.destroy(); MapConroler._instance.failLevel(); diff --git a/assets/Script/prop/Lock.ts b/assets/Script/prop/Lock.ts index 9d25f16..db48955 100644 --- a/assets/Script/prop/Lock.ts +++ b/assets/Script/prop/Lock.ts @@ -37,6 +37,7 @@ export default class Lock extends cc.Component { reduce() { this.time -= 1; NumberToImage.numberToImageNodes(this.time, 20, 8, "lock_", this.node.getChildByName("time"), false); + cc.fx.GameTool.numberScaleAction(this.node.getChildByName("time")); if (this.time <= 0) { if (this.type == "block") { if (this.node.parent) this.node.parent.getComponent("Block").type = 0; diff --git a/assets/Script/prop/Question.ts b/assets/Script/prop/Question.ts index a70d8a6..d40ac60 100644 --- a/assets/Script/prop/Question.ts +++ b/assets/Script/prop/Question.ts @@ -50,8 +50,9 @@ export default class Question extends cc.Component { this.time -= number; if (this.time <= 0) this.time = 0 NumberToImage.numberToImageNodes(this.time, 40, 25, "pc_num_", this.node.getChildByName("time"), false); - this.node.getChildByName("time").scaleX = 1.2; - this.node.getChildByName("time").scaleY = 1.2; + cc.fx.GameTool.numberScaleAction(this.node.getChildByName("time")); + // this.node.getChildByName("time").scaleX = 1.2; + // this.node.getChildByName("time").scaleY = 1.2; // this.node.getChildByName("time").getComponent(cc.Label).string = this.time.toString(); if (this.time <= 0) { this.node.getChildByName("bingkuai").active = true; diff --git a/assets/UI/UI/boom2.png b/assets/UI/UI/boom2.png new file mode 100644 index 0000000..e43149b Binary files /dev/null and b/assets/UI/UI/boom2.png differ diff --git a/assets/UI/UI/boom2.png.meta b/assets/UI/UI/boom2.png.meta new file mode 100644 index 0000000..045d4bf --- /dev/null +++ b/assets/UI/UI/boom2.png.meta @@ -0,0 +1,38 @@ +{ + "ver": "2.3.7", + "uuid": "8959ad5f-c8d7-4053-810a-b1ad9c8f2451", + "importer": "texture", + "type": "sprite", + "wrapMode": "clamp", + "filterMode": "bilinear", + "premultiplyAlpha": false, + "genMipmaps": false, + "packable": true, + "width": 100, + "height": 100, + "platformSettings": {}, + "subMetas": { + "boom2": { + "ver": "1.0.6", + "uuid": "4c20b06a-6507-495a-a583-1b58aa0707df", + "importer": "sprite-frame", + "rawTextureUuid": "8959ad5f-c8d7-4053-810a-b1ad9c8f2451", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 8, + "trimY": 3, + "width": 84, + "height": 94, + "rawWidth": 100, + "rawHeight": 100, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "subMetas": {} + } + } +} \ No newline at end of file diff --git a/assets/UI/UI/xin.png b/assets/UI/UI/xin.png new file mode 100644 index 0000000..efab556 Binary files /dev/null and b/assets/UI/UI/xin.png differ diff --git a/assets/UI/UI/xin.png.meta b/assets/UI/UI/xin.png.meta new file mode 100644 index 0000000..08bc2a7 --- /dev/null +++ b/assets/UI/UI/xin.png.meta @@ -0,0 +1,38 @@ +{ + "ver": "2.3.7", + "uuid": "c87c6881-83b8-4046-a9b1-ca0ccc0b4e76", + "importer": "texture", + "type": "sprite", + "wrapMode": "clamp", + "filterMode": "bilinear", + "premultiplyAlpha": false, + "genMipmaps": false, + "packable": true, + "width": 92, + "height": 88, + "platformSettings": {}, + "subMetas": { + "xin": { + "ver": "1.0.6", + "uuid": "d1fb07ef-8763-4e07-b38f-63071b2d0ee4", + "importer": "sprite-frame", + "rawTextureUuid": "c87c6881-83b8-4046-a9b1-ca0ccc0b4e76", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 92, + "height": 88, + "rawWidth": 92, + "rawHeight": 88, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "subMetas": {} + } + } +} \ No newline at end of file diff --git a/assets/prefab/prop/boom2.prefab b/assets/prefab/prop/boom2.prefab index 5b19f8d..f0786a0 100644 --- a/assets/prefab/prop/boom2.prefab +++ b/assets/prefab/prop/boom2.prefab @@ -107,14 +107,14 @@ "_color": { "__type__": "cc.Color", "r": 255, - "g": 29, - "b": 29, + "g": 255, + "b": 255, "a": 255 }, "_contentSize": { "__type__": "cc.Size", - "width": 62, - "height": 95 + "width": 84, + "height": 94 }, "_anchorPoint": { "__type__": "cc.Vec2", @@ -125,8 +125,8 @@ "__type__": "TypedArray", "ctor": "Float64Array", "array": [ - 0.614, - 15.971, + 8.842, + 6.242, 0, 0, 0, @@ -166,7 +166,7 @@ "_srcBlendFactor": 770, "_dstBlendFactor": 771, "_spriteFrame": { - "__uuid__": "e22aadda-4f7e-403a-a1e6-d5374fc2862a" + "__uuid__": "4c20b06a-6507-495a-a583-1b58aa0707df" }, "_type": 0, "_sizeMode": 1, @@ -179,9 +179,7 @@ "_fillStart": 0, "_fillRange": 0, "_isTrimmedMode": true, - "_atlas": { - "__uuid__": "d2adfa00-68ea-4d63-97a0-44fca153a2d7" - }, + "_atlas": null, "_id": "" }, { @@ -192,7 +190,7 @@ "asset": { "__id__": 0 }, - "fileId": "4ahWLpW2tD8LfIbT5i2bbo", + "fileId": "61CoqNIAZGc5WgJzkmhnWq", "sync": false }, { diff --git a/settings/project.json b/settings/project.json index 55064a7..da11160 100644 --- a/settings/project.json +++ b/settings/project.json @@ -1,5 +1,5 @@ { - "last-module-event-record-time": 1765768067604, + "last-module-event-record-time": 1766388151502, "group-list": [ "default", "Map"