移除Bitset更改为Bits
This commit is contained in:
14
source/src/ECS/Utils/Bits.ts
Normal file
14
source/src/ECS/Utils/Bits.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
module es {
|
||||
export class Bits {
|
||||
private _bit: {[index: number]: number} = {};
|
||||
|
||||
public set(index: number, value: number) {
|
||||
this._bit[index] = value;
|
||||
}
|
||||
|
||||
public get(index: number): number {
|
||||
let v = this._bit[index];
|
||||
return v == null ? 0 : v;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user