re.c('level') .defines({ build:function(){ if(re.hitmap){ re.hitmap.dispose(); } re.hitmap = re.e('hitmap'); this.placeTiles(); this.placeHero(); //items requires hero to be defined first this.placeItems(); }, teardown:function(){ //todo }, placeTiles:function(){ var map = this.layer.data.$; for(var y=0; y