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

FlxTilemap.loadMap() doesn't initialize widthInTiles #34

Closed
FlixelCommunityBot opened this issue Sep 13, 2012 · 1 comment
Closed

FlxTilemap.loadMap() doesn't initialize widthInTiles #34

FlixelCommunityBot opened this issue Sep 13, 2012 · 1 comment
Assignees
Milestone

Comments

@FlixelCommunityBot
Copy link

Issue #197 by: GregoryWeir

FlxTilemap.loadMap() doesn't initialize widthInTiles, but expects it to be zero. It only updates widthInTiles based on the provided map if widthInTiles is 0, which means that loading a new map into an already-initialized FlxTilemap does not change the width of the map.

I suggest that loadMap() set widthInTiles to 0 near where it sets the value of heightInTiles, which will allow the later while loop to properly set the tilemap's new width.

@FlixelCommunityBot
Copy link
Author

Comment by: GregoryWeir

On further experimentation, it seems that _buffers also needs to be reinitialized to a new empty array in order to make loadMap work on a second call.

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

No branches or pull requests

2 participants