From 8006331308d6b2941b0744b13902ffe0513eedd9 Mon Sep 17 00:00:00 2001 From: walkpan Date: Sat, 28 Mar 2026 13:03:15 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=8D=A1=E7=89=8C?= =?UTF-8?q?=E8=A7=A6=E6=91=B8=E4=BA=8B=E4=BB=B6=E6=9C=AA=E7=BB=91=E5=AE=9A?= =?UTF-8?q?=E5=8F=8A=E8=B0=83=E6=95=B4=E6=B8=B8=E6=88=8F=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E5=92=8CUI=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 启用CardComp中的卡牌触摸事件绑定以支持交互 - 将游戏地平线(GAME_LINE)从0调整为100 - 更新引擎配置使用spine-4.2替代spine-3.8 - 调整多个prefab中的节点位置、尺寸和缩放比例 - 修正地图背景高度和底部边距 - 禁用card.prefab中的某个组件 --- assets/resources/game/map/map_rpg.prefab | 16 +++++++------- assets/resources/gui/element/card.prefab | 2 +- assets/resources/gui/element/hnode.prefab | 8 +++---- assets/script/game/common/config/GameSet.ts | 2 +- assets/script/game/map/CardComp.ts | 24 ++++++++++----------- settings/v2/packages/engine.json | 4 ++-- 6 files changed, 28 insertions(+), 28 deletions(-) diff --git a/assets/resources/game/map/map_rpg.prefab b/assets/resources/game/map/map_rpg.prefab index 3ffdbed5..ea4deb64 100644 --- a/assets/resources/game/map/map_rpg.prefab +++ b/assets/resources/game/map/map_rpg.prefab @@ -584,7 +584,7 @@ "_lpos": { "__type__": "cc.Vec3", "x": 0, - "y": -17.451, + "y": 107.444, "z": 0 }, "_lrot": { @@ -720,7 +720,7 @@ "_lpos": { "__type__": "cc.Vec3", "x": 0, - "y": 212.041, + "y": 336.936, "z": 0 }, "_lrot": { @@ -856,7 +856,7 @@ "_lpos": { "__type__": "cc.Vec3", "x": 0, - "y": -71.608, + "y": 53.287, "z": 0 }, "_lrot": { @@ -992,7 +992,7 @@ "_lpos": { "__type__": "cc.Vec3", "x": 0, - "y": -68.815, + "y": 56.08, "z": 0 }, "_lrot": { @@ -1128,7 +1128,7 @@ "_lpos": { "__type__": "cc.Vec3", "x": 0, - "y": -428.693, + "y": -363.417, "z": 0 }, "_lrot": { @@ -1169,7 +1169,7 @@ "_contentSize": { "__type__": "cc.Size", "width": 960, - "height": 600 + "height": 899.8 }, "_anchorPoint": { "__type__": "cc.Vec2", @@ -1267,7 +1267,7 @@ "_lpos": { "__type__": "cc.Vec3", "x": 0, - "y": -130, + "y": -30, "z": 0 }, "_lrot": { @@ -1383,7 +1383,7 @@ "_left": 0, "_right": 0, "_top": 0, - "_bottom": -80, + "_bottom": 20, "_horizontalCenter": 0, "_verticalCenter": 0, "_isAbsLeft": true, diff --git a/assets/resources/gui/element/card.prefab b/assets/resources/gui/element/card.prefab index 2d073e30..fa801630 100644 --- a/assets/resources/gui/element/card.prefab +++ b/assets/resources/gui/element/card.prefab @@ -4578,7 +4578,7 @@ "__id__": 197 } ], - "_active": true, + "_active": false, "_components": [ { "__id__": 203 diff --git a/assets/resources/gui/element/hnode.prefab b/assets/resources/gui/element/hnode.prefab index 49738b49..45bfd6f2 100644 --- a/assets/resources/gui/element/hnode.prefab +++ b/assets/resources/gui/element/hnode.prefab @@ -286,7 +286,7 @@ "_lpos": { "__type__": "cc.Vec3", "x": 0, - "y": 45, + "y": 37.492, "z": 0 }, "_lrot": { @@ -298,8 +298,8 @@ }, "_lscale": { "__type__": "cc.Vec3", - "x": -1.5, - "y": 1.5, + "x": -1.3, + "y": 1.3, "z": 1 }, "_mobility": 0, @@ -1838,7 +1838,7 @@ "_lpos": { "__type__": "cc.Vec3", "x": 0, - "y": 76.713, + "y": 82.752, "z": 0 }, "_lrot": { diff --git a/assets/script/game/common/config/GameSet.ts b/assets/script/game/common/config/GameSet.ts index 6357f0d2..aab648be 100644 --- a/assets/script/game/common/config/GameSet.ts +++ b/assets/script/game/common/config/GameSet.ts @@ -11,7 +11,7 @@ export enum BoxSet { LETF_END = -420, RIGHT_END = 420, //游戏地平线 - GAME_LINE = 0, + GAME_LINE = 100, //攻击距离 } diff --git a/assets/script/game/map/CardComp.ts b/assets/script/game/map/CardComp.ts index fe53d0d7..a6a680c8 100644 --- a/assets/script/game/map/CardComp.ts +++ b/assets/script/game/map/CardComp.ts @@ -277,22 +277,22 @@ export class CardComp extends CCComp { /** 绑定触控:卡面点击使用,锁按钮点击切换锁定 */ private bindEvents() { - // this.node.on(NodeEventType.TOUCH_START, this.onCardTouchStart, this); - // this.node.on(NodeEventType.TOUCH_MOVE, this.onCardTouchMove, this); - // this.node.on(NodeEventType.TOUCH_END, this.onCardTouchEnd, this); - // this.node.on(NodeEventType.TOUCH_CANCEL, this.onCardTouchCancel, this); - // this.Lock?.on(NodeEventType.TOUCH_END, this.onToggleLock, this); - // this.unLock?.on(NodeEventType.TOUCH_END, this.onToggleLock, this); + this.node.on(NodeEventType.TOUCH_START, this.onCardTouchStart, this); + this.node.on(NodeEventType.TOUCH_MOVE, this.onCardTouchMove, this); + this.node.on(NodeEventType.TOUCH_END, this.onCardTouchEnd, this); + this.node.on(NodeEventType.TOUCH_CANCEL, this.onCardTouchCancel, this); + this.Lock?.on(NodeEventType.TOUCH_END, this.onToggleLock, this); + this.unLock?.on(NodeEventType.TOUCH_END, this.onToggleLock, this); } /** 解绑触控,防止节点销毁后残留回调 */ private unbindEvents() { - // this.node.off(NodeEventType.TOUCH_START, this.onCardTouchStart, this); - // this.node.off(NodeEventType.TOUCH_MOVE, this.onCardTouchMove, this); - // this.node.off(NodeEventType.TOUCH_END, this.onCardTouchEnd, this); - // this.node.off(NodeEventType.TOUCH_CANCEL, this.onCardTouchCancel, this); - // this.Lock?.off(NodeEventType.TOUCH_END, this.onToggleLock, this); - // this.unLock?.off(NodeEventType.TOUCH_END, this.onToggleLock, this); + this.node.off(NodeEventType.TOUCH_START, this.onCardTouchStart, this); + this.node.off(NodeEventType.TOUCH_MOVE, this.onCardTouchMove, this); + this.node.off(NodeEventType.TOUCH_END, this.onCardTouchEnd, this); + this.node.off(NodeEventType.TOUCH_CANCEL, this.onCardTouchCancel, this); + this.Lock?.off(NodeEventType.TOUCH_END, this.onToggleLock, this); + this.unLock?.off(NodeEventType.TOUCH_END, this.onToggleLock, this); } private onCardTouchStart(event: EventTouch) { diff --git a/settings/v2/packages/engine.json b/settings/v2/packages/engine.json index 11ee393a..30768593 100644 --- a/settings/v2/packages/engine.json +++ b/settings/v2/packages/engine.json @@ -151,7 +151,7 @@ }, "spine": { "_value": true, - "_option": "spine-3.8" + "_option": "spine-4.2" }, "spine-3.8": { "_value": true, @@ -210,7 +210,7 @@ "profiler", "rich-text", "skeletal-animation", - "spine-3.8", + "spine-4.2", "tween", "ui" ],