伤害系统有问题,打算放弃

This commit is contained in:
2025-02-03 15:03:45 +08:00
parent 8f2612bda2
commit 060046a6a6
18 changed files with 549 additions and 112 deletions

View File

@@ -3,7 +3,6 @@ import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ec
import { BattleState } from "./BattleStateComp";
import { smc } from "../common/SingletonModuleComp";
import { GameEvent } from "../common/config/GameEvent";
import { DamageResult } from "../damage/DamageComp";
@ecs.register('BattleManager')
export class BattleManager extends ecs.Entity {
@@ -72,12 +71,6 @@ export class BattleManagerSystem extends ecs.ComblockSystem {
private onBattleEnd(entity: ecs.Entity) {
// 发放奖励、保存进度等
const state = entity.get(BattleState); // 清理所有残留伤害组件
ecs.query(ecs.allOf(DamageResult)).forEach(entity => {
entity.remove(DamageResult);
});
// 重置战斗状态
state.isEnded = false;
entity.destroy();
}
}