refactor: no queries
This commit is contained in:
parent
f2445648c4
commit
d62e958d69
|
@ -2,12 +2,6 @@ import {System} from '@/ecs/index.js';
|
||||||
|
|
||||||
export default class CalculateAabbs extends System {
|
export default class CalculateAabbs extends System {
|
||||||
|
|
||||||
static queries() {
|
|
||||||
return {
|
|
||||||
default: ['Position', 'VisibleAabb'],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
tick() {
|
tick() {
|
||||||
const {diff} = this.ecs;
|
const {diff} = this.ecs;
|
||||||
for (const id in diff) {
|
for (const id in diff) {
|
||||||
|
|
|
@ -3,12 +3,6 @@ import {System} from '@/ecs/index.js';
|
||||||
|
|
||||||
export default class FollowCamera extends System {
|
export default class FollowCamera extends System {
|
||||||
|
|
||||||
static queries() {
|
|
||||||
return {
|
|
||||||
default: ['Camera', 'Position'],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
reindex(entities) {
|
reindex(entities) {
|
||||||
super.reindex(entities);
|
super.reindex(entities);
|
||||||
for (const id of entities) {
|
for (const id of entities) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user