Jump to content
This forum will be closing down. Please move to the respective dedicated project forums.

Reload layer without destroying the map


microspace
 Share

Recommended Posts

Hello! I want to reload map, but this time without destroying map object. Previously I was doing it this way:

Create:

map = TopDownGame.game.add.tilemap("mytilemap");   
map.addTilesetImage('tileSheet', 'myTiles');
flour = map.createLayer('flour');

Destroy and recreate:

map.destroy();
flour.destroy();

map = TopDownGame.game.add.tilemap("mytilemap");   
map.addTilesetImage('tileSheet', 'myTiles');
flour = map.createLayer('flour');

 But here I have to destroy map object too. Is there a way to do this without destroying map object?

(I now that I can always use `putTileWorld`)

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...