移除Bitset更改为Bits

This commit is contained in:
yhh
2021-05-07 16:23:15 +08:00
parent b3c85e00f9
commit f7061f360d
10 changed files with 303 additions and 1316 deletions

View File

@@ -35,20 +35,14 @@ module es {
* 指定应该调用这个entity update方法的频率。1表示每一帧2表示每一帧以此类推
*/
public updateInterval: number = 1;
/**
* 返回一个BitSet实例包含实体拥有的组件的位
*/
public componentBits: BitSet;
private systemBits_: BitSet;
public componentBits: Bits;
constructor(name: string) {
this.components = new ComponentList(this);
this.transform = new Transform(this);
this.componentBits = new Bits();
this.name = name;
this.id = Entity._idGenerator++;
this.systemBits_ = new BitSet();
this.componentBits = new BitSet();
}
public _isDestroyed: boolean;
@@ -111,10 +105,6 @@ module es {
this.setUpdateOrder(value);
}
public getSystemBits(): BitSet {
return this.systemBits_;
}
public get parent(): Transform {
return this.transform.parent;
}