新增fastList、注释完善
This commit is contained in:
16
source/src/ECS/Components/IUpdatable.ts
Normal file
16
source/src/ECS/Components/IUpdatable.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
module es {
|
||||
export interface IUpdatable {
|
||||
enabled: boolean;
|
||||
updateOrder: number;
|
||||
update();
|
||||
}
|
||||
|
||||
/**
|
||||
* 用于比较组件更新排序
|
||||
*/
|
||||
export class IUpdatableComparer implements IComparer<IUpdatable> {
|
||||
public compare(a: Component, b: Component) {
|
||||
return a.updateOrder - b.updateOrder;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user