1 decade ago by Hitster
My game has tons of levels with a level select, Angry Birds style, and I don't want all the levels stored in the memory at once, especially since I plan to release it on mobile.
Currently I am trying to unload the previous level once either a level has been completed or the user goes back to the level select. But I cant get it v_v
Currently I am trying to unload the previous level once either a level has been completed or the user goes back to the level select. But I cant get it v_v
//Back Button Here--------------------------------------------------------- if (ig.input.pressed('escape')) { //delete backgroundMap.tiles; delete backgroundMap.tiles; delete ig.Image.cache['media/tiles.png']; delete LevelLvl1Resources[0]; delete LevelLvl2Resources[0]; // this is just a blank level I'm loading right now to put my level select on ig.game.loadLevel( LevelLvl0 ); this.myDirector = new ig.buttonmanager() } //------------------------------------------------------------------------\\