reformat code

This commit is contained in:
yhh
2020-07-28 16:25:20 +08:00
parent 5994f0bee3
commit 514572f291
103 changed files with 2896 additions and 2839 deletions

View File

@@ -1,28 +1,28 @@
module es {
export class Matcher{
export class Matcher {
protected allSet = new BitSet();
protected exclusionSet = new BitSet();
protected oneSet = new BitSet();
public static empty(){
public static empty() {
return new Matcher();
}
public getAllSet(){
public getAllSet() {
return this.allSet;
}
public getExclusionSet(){
public getExclusionSet() {
return this.exclusionSet;
}
public getOneSet(){
public getOneSet() {
return this.oneSet;
}
public IsIntersted(e: Entity){
if (!this.allSet.isEmpty()){
for (let i = this.allSet.nextSetBit(0); i >= 0; i = this.allSet.nextSetBit(i + 1)){
public IsIntersted(e: Entity) {
if (!this.allSet.isEmpty()) {
for (let i = this.allSet.nextSetBit(0); i >= 0; i = this.allSet.nextSetBit(i + 1)) {
if (!e.componentBits.get(i))
return false;
}
@@ -37,7 +37,7 @@ module es {
return true;
}
public all(...types: any[]): Matcher{
public all(...types: any[]): Matcher {
types.forEach(type => {
this.allSet.set(ComponentTypeManager.getIndexFor(type));
});
@@ -45,7 +45,7 @@ module es {
return this;
}
public exclude(...types: any[]){
public exclude(...types: any[]) {
types.forEach(type => {
this.exclusionSet.set(ComponentTypeManager.getIndexFor(type));
});
@@ -53,7 +53,7 @@ module es {
return this;
}
public one(...types: any[]){
public one(...types: any[]) {
types.forEach(type => {
this.oneSet.set(ComponentTypeManager.getIndexFor(type));
});