1 decade ago by fugufish
back to basic question:
i need to call the health property of an enemy entity.
i call var ent = this.getEntitiesByType(EntityEnemy)[0];
and console.log('health: ', ent.health) yields nothing.
am i missing something? I've already set the health property to 500 in EntityEnemy.
i need to call the health property of an enemy entity.
i call var ent = this.getEntitiesByType(EntityEnemy)[0];
and console.log('health: ', ent.health) yields nothing.
am i missing something? I've already set the health property to 500 in EntityEnemy.