]>
git.r.bdr.sh - rbdr/serpentity/blob - lib/serpentity/node.js
00abde2b34c6d31efd1d2d99d50aa55100b1fa41
2 * A node describes a set of components in order to describe entities
5 Class(Serpentity
, "Node")({
8 * Returns true if the given entity matches the defined protocol,
11 matches : function matches(entity
) {
12 var property
, matched
, types
;
16 for (property
in this.types
) {
18 if (this.types
.hasOwnProperty(property
)) {
21 if (entity
.hasComponent(types
[property
])) {
38 init : function (config
) {
43 for (property
in this.constructor) {
44 if (this.constructor.hasOwnProperty(property
)) {
45 this.types
[property
] = this.constructor[property
];