fix: index only active
This commit is contained in:
parent
c27ab133a9
commit
5a92be47c1
|
@ -178,7 +178,11 @@ export default class Ecs {
|
||||||
|
|
||||||
deindex(entityIds) {
|
deindex(entityIds) {
|
||||||
for (const systemName in this.Systems) {
|
for (const systemName in this.Systems) {
|
||||||
this.Systems[systemName].deindex(entityIds);
|
const System = this.Systems[systemName];
|
||||||
|
if (!System.active) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
System.deindex(entityIds);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -384,7 +388,11 @@ export default class Ecs {
|
||||||
|
|
||||||
reindex(entityIds) {
|
reindex(entityIds) {
|
||||||
for (const systemName in this.Systems) {
|
for (const systemName in this.Systems) {
|
||||||
this.Systems[systemName].reindex(entityIds);
|
const System = this.Systems[systemName];
|
||||||
|
if (!System.active) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
System.reindex(entityIds);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user