1 decade ago by potan
I have entity that use getEntitiesByType on init, because i thought calling getEntitiesByType on every frame is not cost effective, so i'd rather call it once in init.
But weltmeister will throw this error when i load the level with this entity.
my code on init:
Error message:
Everytime i need to load my level I have to comment the getEntitiesByType, so that it works correctly on weltmeister.
any other solution ?
But weltmeister will throw this error when i load the level with this entity.
my code on init:
this.mPlayer = ig.game.getEntitiesByType( EntityPlayer );
Error message:
lib/game/entities/monster.js:38Uncaught TypeError: Object [object Object] has no method 'getEntitiesByType'
Everytime i need to load my level I have to comment the getEntitiesByType, so that it works correctly on weltmeister.
any other solution ?