伤害系统有问题,打算放弃
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user