diff --git a/assets/resources/gui/element/card.prefab b/assets/resources/gui/element/card.prefab index 705115bf..d9687264 100644 --- a/assets/resources/gui/element/card.prefab +++ b/assets/resources/gui/element/card.prefab @@ -1338,7 +1338,7 @@ }, "_lscale": { "__type__": "cc.Vec3", - "x": 1, + "x": -1, "y": 1, "z": 1 }, diff --git a/assets/script/game/common/config/GameSet.ts b/assets/script/game/common/config/GameSet.ts index d784a22f..33c7231b 100644 --- a/assets/script/game/common/config/GameSet.ts +++ b/assets/script/game/common/config/GameSet.ts @@ -8,8 +8,8 @@ export enum BoxSet { MONSTER = 2, HERO = 4, //地图边界 - LETF_END = -420, - RIGHT_END = 420, + LETF_END = -360, + RIGHT_END = 360, //游戏地平线 GAME_LINE = 100, //攻击距离 diff --git a/assets/script/game/hero/SCastSystem.ts b/assets/script/game/hero/SCastSystem.ts index ff3f1dfc..a7fd750e 100644 --- a/assets/script/game/hero/SCastSystem.ts +++ b/assets/script/game/hero/SCastSystem.ts @@ -7,7 +7,7 @@ import { Skill } from "../skill/Skill"; import { smc } from "../common/SingletonModuleComp"; import { HType } from "../common/config/heroSet"; import { Attrs } from "../common/config/HeroAttrs"; -import { FightSet } from "../common/config/GameSet"; +import { BoxSet, FightSet } from "../common/config/GameSet"; /** * ==================== 自动施法系统 ==================== @@ -38,6 +38,10 @@ export class SCastSystem extends ecs.ComblockSystem implements ecs.ISystemUpdate } return this.heroMatcher; } + + private isOutOfBattleBounds(x: number): boolean { + return x < BoxSet.LETF_END || x > BoxSet.RIGHT_END; + } /** 系统过滤器:仅处理英雄实体 */ filter(): ecs.IMatcher { @@ -57,6 +61,7 @@ export class SCastSystem extends ecs.ComblockSystem implements ecs.ISystemUpdate const heroAttrs = e.get(HeroAttrsComp); const heroView = e.get(HeroViewComp); if (!heroAttrs || !heroView || !heroView.node) return; + if (this.isOutOfBattleBounds(heroView.node.position.x)) return; if (heroAttrs.is_dead || heroAttrs.is_reviving || heroAttrs.isFrost()) return; heroAttrs.updateCD(this.dt); heroView.cd_show(); @@ -329,6 +334,7 @@ export class SCastSystem extends ecs.ComblockSystem implements ecs.ISystemUpdate if (!attrs || !view?.node) return; if (attrs.fac === heroAttrs.fac) return; if (attrs.is_dead || attrs.is_reviving) return; + if (this.isOutOfBattleBounds(view.node.position.x)) return; const dist = Math.abs(currentX - view.node.position.x); if (dist > maxRange) return; if (dist >= minDist) return; @@ -355,6 +361,7 @@ export class SCastSystem extends ecs.ComblockSystem implements ecs.ISystemUpdate if (attrs.fac === heroAttrs.fac) return; if (attrs.is_dead || attrs.is_reviving) return; const enemyX = view.node.position.x; + if (this.isOutOfBattleBounds(enemyX)) return; const dist = Math.abs(currentX - enemyX); if (dist > maxRange) return; if (direction > 0) { diff --git a/assets/script/game/map/MissionCardComp.ts b/assets/script/game/map/MissionCardComp.ts index 9cbfce32..41b099e1 100644 --- a/assets/script/game/map/MissionCardComp.ts +++ b/assets/script/game/map/MissionCardComp.ts @@ -62,7 +62,7 @@ export class MissionCardComp extends CCComp { /** 当前卡池等级(仅影响抽卡来源,不直接改卡槽现有内容) */ private poolLv: number = CARD_POOL_INIT_LEVEL; private readonly heroInfoItemGap: number = 110; - private readonly heroInfoItemSpacing: number = 10; + private readonly heroInfoItemSpacing: number = 5; private heroInfoSyncTimer: number = 0; private hasCachedCardsBaseScale: boolean = false; private cardsBaseScale: Vec3 = new Vec3(1, 1, 1);