新增entityprocessor管理实体解析器

This commit is contained in:
YHH
2020-06-08 21:53:09 +08:00
parent a048a8ac29
commit 11af0a31a7
17 changed files with 386 additions and 66 deletions

View File

@@ -94,7 +94,7 @@ class BitSet{
public isEmpty(): boolean{
for (let i = this._bits.length - 1; i >= 0; i --){
if (this._bits[i] != 0)
if (this._bits[i])
return false;
}
@@ -121,9 +121,13 @@ class BitSet{
return -1;
}
public set(pos: number){
let offset = pos >> 6;
this.ensure(offset);
this._bits[offset] |= 1 << pos;
public set(pos: number, value: boolean = true){
if (value){
let offset = pos >> 6;
this.ensure(offset);
this._bits[offset] |= 1 << pos;
}else{
this.clear(pos);
}
}
}