1 decade ago by fulvio
If I have the following code in an Entity. Whenever I view that level in Weltmeister I get the following error within the Firebug console:
This the code I'm using within the draw method of my HUD entity:
I have tried both
I have also tried to include
ig.game.getEntitiesByType is not a function
This the code I'm using within the draw method of my HUD entity:
draw: function () {
this.font.draw('Coins: ' + ig.game.getEntitiesByType(EntityCoin).length + '/' + ig.game.coinCount, 185, 5);
this.parent();
}
I have tried both
ig.game.getEntitiesByType() and this.getEntitiesByType() and neither seem to remove that error.I have also tried to include
game.entities.coin and add it as a module, but the same error pops up in the console. 