]>
git.r.bdr.sh - rbdr/serpentity/blob - lib/serpentity/node.js
629e4ed8761adffc50e8a5776e370c358b9c2d0e
2 * A node describes a set of components in order to describe entities
8 * Returns true if the given entity matches the defined protocol,
11 static matches(entity
) {
13 const typeNames
= Object
.keys(this.types
);
15 for (const typeName
of typeNames
) {
17 const type
= this.types
[typeName
];
20 if (entity
.hasComponent(type
)) {
36 Object
.assign(this, config
);