Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reloading A FlxTilemap #232

Open
michaelplzno opened this issue Oct 27, 2012 · 0 comments
Open

Reloading A FlxTilemap #232

michaelplzno opened this issue Oct 27, 2012 · 0 comments

Comments

@michaelplzno
Copy link

There is a bug when you call loadMap twice on the same map. This could be useful in a lot of situations and its only a few lines to fix. I found the fix elsewhere on the forums here but thought I'd make an entry here.

You must add the following lines to the loadMap function on line 193 of FlxTilemap.as

var i:uint = _buffers.length;
while(i < l)
    (_buffers[i++] as FlxTilemapBuffer).destroy();
_buffers = new Array();

widthInTiles = 0;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant