diff --git a/assets/resources/game/map/map_rpg.prefab b/assets/resources/game/map/map_rpg.prefab index 32160bd4..3ffdbed5 100644 --- a/assets/resources/game/map/map_rpg.prefab +++ b/assets/resources/game/map/map_rpg.prefab @@ -1267,7 +1267,7 @@ "_lpos": { "__type__": "cc.Vec3", "x": 0, - "y": -170, + "y": -130, "z": 0 }, "_lrot": { @@ -1383,7 +1383,7 @@ "_left": 0, "_right": 0, "_top": 0, - "_bottom": -120, + "_bottom": -80, "_horizontalCenter": 0, "_verticalCenter": 0, "_isAbsLeft": true, diff --git a/assets/script/game/common/config/GameSet.ts b/assets/script/game/common/config/GameSet.ts index c512f1cb..6357f0d2 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 = -40, + GAME_LINE = 0, //攻击距离 } diff --git a/assets/script/game/hero/SCastSystem.ts b/assets/script/game/hero/SCastSystem.ts index 237178ff..b7b1a626 100644 --- a/assets/script/game/hero/SCastSystem.ts +++ b/assets/script/game/hero/SCastSystem.ts @@ -53,6 +53,7 @@ export class SCastSystem extends ecs.ComblockSystem implements ecs.ISystemUpdate update(e: ecs.Entity): void { if(!smc.mission.play ) return; if(smc.mission.pause) return + if(!smc.mission.in_fight) return const heroAttrs = e.get(HeroAttrsComp); const heroView = e.get(HeroViewComp); if (!heroAttrs || !heroView || !heroView.node) return; @@ -107,6 +108,7 @@ export class SCastSystem extends ecs.ComblockSystem implements ecs.ISystemUpdate * - 触发技能CD */ private castSkill(castPlan: { skillId: number; skillLv: number; isFriendly: boolean; targetPos: Vec3 | null; targetEids: number[] }, heroAttrs: HeroAttrsComp, heroView: HeroViewComp) { + if (!smc.mission.in_fight) return; const s_uuid = castPlan.skillId; const skillLv = castPlan.skillLv; const config = SkillSet[s_uuid]; @@ -124,9 +126,11 @@ export class SCastSystem extends ecs.ComblockSystem implements ecs.ISystemUpdate const delay = config.ready > 0 ? config.ready : GameConst.Battle.SKILL_CAST_DELAY; heroView.scheduleOnce(() => { + if (!smc.mission.play || smc.mission.pause || !smc.mission.in_fight) return; if (!heroView.node || !heroView.node.isValid || heroAttrs.is_dead) return; const castTimes = 1 + cNum; for (let i = 0; i < castTimes; i++) { + if (!smc.mission.play || smc.mission.pause || !smc.mission.in_fight) return; if (!heroView.node || !heroView.node.isValid || heroAttrs.is_dead) return; if (castPlan.isFriendly) { const friendlyTargets = this.resolveFriendlyTargets(castPlan.targetEids, heroAttrs.fac); diff --git a/assets/script/game/map/MissionCardComp.ts b/assets/script/game/map/MissionCardComp.ts index 8567ef5e..001d6d65 100644 --- a/assets/script/game/map/MissionCardComp.ts +++ b/assets/script/game/map/MissionCardComp.ts @@ -178,6 +178,9 @@ export class MissionCardComp extends CCComp { private onNewWave() { this.enterPreparePhase(); + this.layoutCardSlots(); + const cards = this.buildDrawCards(); + this.dispatchCardsToSlots(cards); } /** 解除按钮监听,避免节点销毁后回调泄漏 */ diff --git a/assets/script/game/map/MissionComp.ts b/assets/script/game/map/MissionComp.ts index e6a5f604..10eb0660 100644 --- a/assets/script/game/map/MissionComp.ts +++ b/assets/script/game/map/MissionComp.ts @@ -156,12 +156,14 @@ export class MissionComp extends CCComp { to_fight(){ smc.mission.stop_spawn_mon = false; smc.mission.in_fight=true + smc.vmdata.mission_data.in_fight = true if (this.start_btn && this.start_btn.isValid) this.start_btn.active = false; oops.message.dispatchEvent(GameEvent.FightStart) //GameSetMonComp 监听刷怪 } private enterPreparePhase() { smc.mission.in_fight = false; + smc.vmdata.mission_data.in_fight = false smc.mission.stop_spawn_mon = true; if (this.start_btn && this.start_btn.isValid) this.start_btn.active = true; } @@ -207,6 +209,7 @@ export class MissionComp extends CCComp { smc.mission.play=false smc.mission.pause = false; smc.mission.in_fight = false; + smc.vmdata.mission_data.in_fight = false if (this.start_btn && this.start_btn.isValid) this.start_btn.active = false; this.cleanComponents() this.clearBattlePools()