fix: 修复卡牌触摸事件未绑定及调整游戏配置和UI布局
- 启用CardComp中的卡牌触摸事件绑定以支持交互 - 将游戏地平线(GAME_LINE)从0调整为100 - 更新引擎配置使用spine-4.2替代spine-3.8 - 调整多个prefab中的节点位置、尺寸和缩放比例 - 修正地图背景高度和底部边距 - 禁用card.prefab中的某个组件
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -4578,7 +4578,7 @@
|
||||
"__id__": 197
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_active": false,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 203
|
||||
|
||||
@@ -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": {
|
||||
|
||||
@@ -11,7 +11,7 @@ export enum BoxSet {
|
||||
LETF_END = -420,
|
||||
RIGHT_END = 420,
|
||||
//游戏地平线
|
||||
GAME_LINE = 0,
|
||||
GAME_LINE = 100,
|
||||
//攻击距离
|
||||
}
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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"
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user