diff --git a/assets/Scene/GameScene.fire b/assets/Scene/GameScene.fire index 4a52cee..9a9a2ca 100644 --- a/assets/Scene/GameScene.fire +++ b/assets/Scene/GameScene.fire @@ -7402,8 +7402,8 @@ "__type__": "TypedArray", "ctor": "Float64Array", "array": [ - -4.385, - -62.29, + -13.529, + -60, 0, 0, 0, @@ -7553,7 +7553,7 @@ "ctor": "Float64Array", "array": [ -103.331, - -60.197, + -60, 0, 0, 0, @@ -7865,8 +7865,8 @@ }, "_contentSize": { "__type__": "cc.Size", - "width": 200, - "height": 200 + "width": 0, + "height": 0 }, "_anchorPoint": { "__type__": "cc.Vec2", @@ -7877,7 +7877,7 @@ "__type__": "TypedArray", "ctor": "Float64Array", "array": [ - 14.787, + 3.388, 7.421, 0, 0, @@ -7943,7 +7943,7 @@ "ctor": "Float64Array", "array": [ 125.9, - 1.555, + 3.914, 0, 0, 0, @@ -15267,7 +15267,7 @@ "ctor": "Float64Array", "array": [ 15.137, - 738.462, + 753.348, 0, 0, 0, diff --git a/assets/Scene/HomeScene.fire b/assets/Scene/HomeScene.fire index a2e3569..1857dc4 100644 --- a/assets/Scene/HomeScene.fire +++ b/assets/Scene/HomeScene.fire @@ -1268,8 +1268,8 @@ }, "_contentSize": { "__type__": "cc.Size", - "width": 180, - "height": 180 + "width": 188, + "height": 198 }, "_anchorPoint": { "__type__": "cc.Vec2", @@ -1321,7 +1321,7 @@ "_srcBlendFactor": 770, "_dstBlendFactor": 771, "_spriteFrame": { - "__uuid__": "e21bf9e2-2981-4ab4-8d7a-b3f339a27122" + "__uuid__": "4ce61e08-eb3f-4797-86f7-d0c318f4174c" }, "_type": 0, "_sizeMode": 1, @@ -1335,7 +1335,7 @@ "_fillRange": 0, "_isTrimmedMode": true, "_atlas": { - "__uuid__": "d2adfa00-68ea-4d63-97a0-44fca153a2d7" + "__uuid__": "52d3eb5b-948f-403a-aafa-1c8f1a40a8c8" }, "_id": "9142E2UEJG1J5fb8i3cywI" }, @@ -1650,7 +1650,7 @@ "ctor": "Float64Array", "array": [ 147.114, - 0.31, + -3, 0, 0, 0, @@ -2346,7 +2346,7 @@ "ctor": "Float64Array", "array": [ 147.114, - 0.31, + -3, 0, 0, 0, @@ -2425,8 +2425,8 @@ }, "_contentSize": { "__type__": "cc.Size", - "width": 200, - "height": 200 + "width": 0, + "height": 0 }, "_anchorPoint": { "__type__": "cc.Vec2", @@ -2437,7 +2437,7 @@ "__type__": "TypedArray", "ctor": "Float64Array", "array": [ - 24.546, + 14.792, 1.584, 0, 0, @@ -3315,8 +3315,8 @@ }, "_contentSize": { "__type__": "cc.Size", - "width": 200, - "height": 200 + "width": 0, + "height": 0 }, "_anchorPoint": { "__type__": "cc.Vec2", @@ -3327,7 +3327,7 @@ "__type__": "TypedArray", "ctor": "Float64Array", "array": [ - -12, + -13, 13.122, 0, 0, @@ -3999,7 +3999,7 @@ "ctor": "Float64Array", "array": [ 409.721, - -250.086, + -290.226, 0, 0, 0, @@ -4373,7 +4373,7 @@ "__id__": 89 }, "_children": [], - "_active": true, + "_active": false, "_components": [ { "__id__": 91 @@ -4654,7 +4654,7 @@ "_id": "f7UVr5raRF/5HTo3KzPhgp" }, { - "__type__": "cc.Toggle", + "__type__": "cc.Button", "_name": "", "_objFlags": 0, "node": { @@ -4665,7 +4665,11 @@ "_grayMaterial": null, "duration": 0.1, "zoomScale": 1.2, - "clickEvents": [], + "clickEvents": [ + { + "__id__": 97 + } + ], "_N$interactable": true, "_N$enableAutoGrayEffect": false, "_N$transition": 0, @@ -4719,19 +4723,9 @@ "hoverSprite": null, "_N$disabledSprite": null, "_N$target": { - "__id__": 89 + "__id__": 82 }, - "_N$isChecked": false, - "toggleGroup": null, - "checkMark": { - "__id__": 93 - }, - "checkEvents": [ - { - "__id__": 97 - } - ], - "_id": "c09/yHVMJDoam/VbhBXxcH" + "_id": "79tUVBW9xFPb+dmSkpT9w2" }, { "__type__": "cc.ClickEvent", @@ -4823,7 +4817,7 @@ "__id__": 98 }, "_children": [], - "_active": true, + "_active": false, "_components": [ { "__id__": 100 @@ -5104,7 +5098,7 @@ "_id": "feBIgKuQtF5pWUBQIXgVjQ" }, { - "__type__": "cc.Toggle", + "__type__": "cc.Button", "_name": "", "_objFlags": 0, "node": { @@ -5115,7 +5109,11 @@ "_grayMaterial": null, "duration": 0.1, "zoomScale": 1.2, - "clickEvents": [], + "clickEvents": [ + { + "__id__": 106 + } + ], "_N$interactable": true, "_N$enableAutoGrayEffect": false, "_N$transition": 0, @@ -5168,20 +5166,8 @@ "_N$hoverSprite": null, "hoverSprite": null, "_N$disabledSprite": null, - "_N$target": { - "__id__": 98 - }, - "_N$isChecked": false, - "toggleGroup": null, - "checkMark": { - "__id__": 102 - }, - "checkEvents": [ - { - "__id__": 106 - } - ], - "_id": "b9cAW4AvdAXZdGsjzb8ZZf" + "_N$target": null, + "_id": "d85Ek7cJFJ2L0mYerW0Bdj" }, { "__type__": "cc.ClickEvent", @@ -5273,7 +5259,7 @@ "__id__": 107 }, "_children": [], - "_active": true, + "_active": false, "_components": [ { "__id__": 109 @@ -5554,7 +5540,7 @@ "_id": "6cLP2TnU5DW7CA+QvhiObw" }, { - "__type__": "cc.Toggle", + "__type__": "cc.Button", "_name": "", "_objFlags": 0, "node": { @@ -5565,7 +5551,11 @@ "_grayMaterial": null, "duration": 0.1, "zoomScale": 1.2, - "clickEvents": [], + "clickEvents": [ + { + "__id__": 115 + } + ], "_N$interactable": true, "_N$enableAutoGrayEffect": false, "_N$transition": 0, @@ -5618,20 +5608,8 @@ "_N$hoverSprite": null, "hoverSprite": null, "_N$disabledSprite": null, - "_N$target": { - "__id__": 107 - }, - "_N$isChecked": false, - "toggleGroup": null, - "checkMark": { - "__id__": 111 - }, - "checkEvents": [ - { - "__id__": 115 - } - ], - "_id": "f9H3N/MqVI0ZJ6D1GMBA4u" + "_N$target": null, + "_id": "63z7O+tLZH2pQprPCKMvCp" }, { "__type__": "cc.ClickEvent", @@ -5755,7 +5733,7 @@ "ctor": "Float64Array", "array": [ 409.721, - -646.335, + -686.475, 0, 0, 0, diff --git a/assets/Script/JiaZai.ts b/assets/Script/JiaZai.ts index 6411b4a..01faf21 100644 --- a/assets/Script/JiaZai.ts +++ b/assets/Script/JiaZai.ts @@ -109,7 +109,7 @@ private heathScheduleCallback: Function = null; cc.fx.GameTool.getHealth(null); // cc.fx.GameConfig.LEVEL_INFO_init(false,0); setTimeout(() => { - NumberToImage.numberToImageNodes((cc.fx.GameConfig.GM_INFO.level + 1), 25, 15, "level_", this.level, false); + NumberToImage.numberToImageNodes((cc.fx.GameConfig.GM_INFO.level + 1), 30, 15, "level_", this.level, false); NumberToImage.numberToImageNodes(cc.fx.GameConfig.GM_INFO.coin, 30, 15, "coin_", this.coin, true); this.setHealthInfo(); }, 0); @@ -140,7 +140,6 @@ private heathScheduleCallback: Function = null; //打开heath弹窗,创建预制体 // 打开heath弹窗,创建预制体并启动自己的倒计时 openHeath() { - debugger; let health = cc.instantiate(this.health); this.node.addChild(health); let heathPop = health.getComponent("heathnum").heatht; @@ -151,8 +150,9 @@ openHeath() { let switchButtons = health.getComponent("heathnum").switchButtons; let coin = health.getComponent("heathnum").coin; // 启动弹窗自己的倒计时 + if( cc.fx.GameConfig.GM_INFO.hp < 5) { this.startHeathTimeCutDown(timeNode); - + } if (cc.fx.GameConfig.GM_INFO.hp == 0) { // 体力为0,显示spriteFrames[1],只显示第二个按钮 @@ -162,7 +162,7 @@ openHeath() { // 体力小于5但大于0,显示spriteFrames[1],只显示第一个按钮 if (switchButtons[0]) {switchButtons[0].active = true; swichs[0].active = false;} if (switchButtons[1]) {switchButtons[1].active = false;swichs[1].active = true;} - } else if (cc.fx.GameConfig.GM_INFO.hp == 5) { + } else if (cc.fx.GameConfig.GM_INFO.hp >= 5) { // 体力为5,显示spriteFrames[0],只显示第一个按钮 if (switchButtons[0]) {switchButtons[0].active = true;swichs[0].active = true;} @@ -171,7 +171,7 @@ openHeath() { NumberToImage.numberToImageNodes(cc.fx.GameConfig.GM_INFO.hp, 40, 20, "time_", heathPop, true); // 设置金币花费数 - NumberToImage.numberToImageNodes(900, 35, 15, "button_", coin, true); + NumberToImage.numberToImageNodes(1000, 35, 15, "button_", coin, true); } diff --git a/assets/Script/setUi.ts b/assets/Script/setUi.ts index 28adc0c..0db52ec 100644 --- a/assets/Script/setUi.ts +++ b/assets/Script/setUi.ts @@ -29,16 +29,25 @@ export default class setUi extends cc.Component { musicState: boolean = true; effectState: boolean = true; vibrateState: boolean = true; -private _isSyncing = false; onLoad() { - this.musicState = cc.fx.GameConfig.GM_INFO.musicOpen; this.effectState = cc.fx.GameConfig.GM_INFO.effectOpen; this.vibrateState = cc.fx.GameConfig.GM_INFO.vibrateOpen; - console.log("音乐状态", cc.fx.GameConfig.GM_INFO.musicOpen); - console.log("音效状态", cc.fx.GameConfig.GM_INFO.effectOpen); - console.log("震动状态", cc.fx.GameConfig.GM_INFO.vibrateOpen); - this.syncToggleState(); + if(this.musicState == true) { + this.music.children[0].active = true; + }else { + this.music.children[1].active = true; + } + if(this.effectState == true) { + this.effect.children[0].active = true; + }else { + this.effect.children[1].active = true; + } + if(this.vibrateState == true) { + this.vibrate.children[0].active = true; + }else { + this.vibrate.children[1].active = true; + } } start() { @@ -49,13 +58,13 @@ private _isSyncing = false; } clickMusic() { - if (this._isSyncing) return; if (this.musicState) { this.musicState = false; cc.fx.GameConfig.GM_INFO.musicOpen = this.musicState; this.setMusicConfig(); - + this.music.children[0].active = false; + this.music.children[1].active = true; //如果音乐关闭了,则停止音乐 cc.fx.AudioManager._instance.stopMusic(); } @@ -63,6 +72,8 @@ private _isSyncing = false; this.musicState = true; cc.fx.GameConfig.GM_INFO.musicOpen = this.musicState; this.setMusicConfig(); + this.music.children[0].active = true; + this.music.children[1].active = false; cc.fx.AudioManager._instance.playMusicGame(); } } @@ -77,42 +88,45 @@ private _isSyncing = false; } clickEffect() { - if (this._isSyncing) return; if (this.effectState) { this.effectState = false; cc.fx.GameConfig.GM_INFO.effectOpen = this.effectState; this.setMusicConfig(); + this.effect.children[0].active = false; + this.effect.children[1].active = true; } else { this.effectState = true; cc.fx.GameConfig.GM_INFO.effectOpen = this.effectState; this.setMusicConfig(); + this.effect.children[0].active = true; + this.effect.children[1].active = false; } } clickVibrate() { - if (this._isSyncing) return; if (this.vibrateState) { this.vibrateState = false; cc.fx.GameConfig.GM_INFO.vibrateOpen = this.vibrateState; this.setMusicConfig(); + this.vibrate.children[0].active = false; + this.vibrate.children[1].active = true; } else { this.vibrateState = true; cc.fx.GameConfig.GM_INFO.vibrateOpen = this.vibrateState; this.setMusicConfig(); + this.vibrate.children[0].active = true; + this.vibrate.children[1].active = false; } } syncToggleState() { - this._isSyncing = true; - this.music.getComponent(cc.Toggle).isChecked = cc.fx.GameConfig.GM_INFO.musicOpen; - this.effect.getComponent(cc.Toggle).isChecked = cc.fx.GameConfig.GM_INFO.effectOpen; - this.vibrate.getComponent(cc.Toggle).isChecked = cc.fx.GameConfig.GM_INFO.vibrateOpen; + } //关闭ui diff --git a/assets/UI/UI/start/bg.jpg b/assets/UI/UI/start/bg.jpg index 6c7beeb..0f10431 100644 Binary files a/assets/UI/UI/start/bg.jpg and b/assets/UI/UI/start/bg.jpg differ diff --git a/assets/prefab/pop/heathpop.prefab b/assets/prefab/pop/heathpop.prefab index 1b41eee..84164e9 100644 --- a/assets/prefab/pop/heathpop.prefab +++ b/assets/prefab/pop/heathpop.prefab @@ -2374,7 +2374,7 @@ "ctor": "Float64Array", "array": [ -449.112, - 5, + 0, 0, 0, 0, diff --git a/assets/shop/prefab/shop.prefab b/assets/shop/prefab/shop.prefab index d6b2350..aed5526 100644 --- a/assets/shop/prefab/shop.prefab +++ b/assets/shop/prefab/shop.prefab @@ -903,8 +903,8 @@ "__type__": "TypedArray", "ctor": "Float64Array", "array": [ - 0, - -86, + -7.506, + -101.868, 0, 0, 0, @@ -1035,7 +1035,7 @@ "ctor": "Float64Array", "array": [ -351.5, - -384, + -415.736, 0, 0, 0, @@ -1105,8 +1105,8 @@ 0, 0, 1, - 1, - 1, + 2, + 2, 1 ] }, @@ -1139,7 +1139,7 @@ "_srcBlendFactor": 770, "_dstBlendFactor": 771, "_spriteFrame": { - "__uuid__": "36f63644-d9f3-4223-aee9-bc771717015d" + "__uuid__": "639e99e1-c8c1-4891-b07e-5a08962d0193" }, "_type": 0, "_sizeMode": 0, @@ -1731,7 +1731,7 @@ "ctor": "Float64Array", "array": [ 0.5, - -384, + -415.736, 0, 0, 0, @@ -1801,8 +1801,8 @@ 0, 0, 1, - 1, - 1, + 2, + 2, 1 ] }, @@ -2427,7 +2427,7 @@ "ctor": "Float64Array", "array": [ 352.5, - -384, + -415.736, 0, 0, 0, @@ -2497,8 +2497,8 @@ 0, 0, 1, - 1, - 1, + 2, + 2, 1 ] }, @@ -3123,7 +3123,7 @@ "ctor": "Float64Array", "array": [ -351.5, - -878, + -909.736, 0, 0, 0, @@ -3193,8 +3193,8 @@ 0, 0, 1, - 1, - 1, + 2, + 2, 1 ] }, @@ -3819,7 +3819,7 @@ "ctor": "Float64Array", "array": [ 0.5, - -878, + -909.736, 0, 0, 0, @@ -3889,8 +3889,8 @@ 0, 0, 1, - 1, - 1, + 2.5, + 2.5, 1 ] }, @@ -4515,7 +4515,7 @@ "ctor": "Float64Array", "array": [ 352.5, - -878, + -909.736, 0, 0, 0, @@ -4585,8 +4585,8 @@ 0, 0, 1, - 1, - 1, + 2.5, + 2.5, 1 ] }, @@ -7141,7 +7141,7 @@ "__type__": "TypedArray", "ctor": "Float64Array", "array": [ - 466.136, + 424.853, 909.389, 0, 0,