Files
esengine/src/ECS/Systems/ProcessingSystem.ts

30 lines
908 B
TypeScript
Raw Normal View History

import { EntitySystem } from './EntitySystem';
import { Entity } from '../Entity';
/**
*
* EntitySystem类
* processSystem方法
*/
export abstract class ProcessingSystem extends EntitySystem {
/**
*
* @param entity
*/
public override onChanged(entity: Entity): void { }
/**
* processSystem方法进行处理
* @param entities 使
*/
protected override process(entities: Entity[]): void {
// 调用子类实现的processSystem方法进行实体处理
this.processSystem();
}
/**
*
*/
public abstract processSystem(): void;
}