flxSharp icon indicating copy to clipboard operation
flxSharp copied to clipboard

FlxTilemap

Open euphoria3k opened this issue 13 years ago • 2 comments

I noticed there is an issue with FlxTilemap supporting multiple row sprite sheets.

The following code in FlxTile will fix this:

int colsInGraphic = tilemap.tileGraphic.Width / (int)Width; tileGraphicSectionToDraw = new Rectangle((index - (int)Math.Floor((float)index / colsInGraphic) * colsInGraphic) * (int)Width, (int)Math.Floor((float)index / colsInGraphic) * (int)Height, (int)Width, (int)Height); drawPosition = new Vector2(Tx * Width, Ty * Height);

euphoria3k avatar Mar 16 '13 23:03 euphoria3k

Thanks for info! :+1: flxSharp is still work in progress. I'll fix the bug as soon as FlxTilemap get's refactored! :)

jlorek avatar Mar 18 '13 10:03 jlorek

Awesome! I've been wanting to create a 2.55 XNA port for a while now just haven't had the time!

euphoria3k avatar Mar 19 '13 14:03 euphoria3k