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