Created
August 3, 2012 19:19
-
-
Save migimunz/3250590 to your computer and use it in GitHub Desktop.
the int problem
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ... */ | |
class TilemapIterator | |
{ | |
private var tilemap:FlxTilemap; | |
private var curX:Int; | |
private var curY:Int; | |
private var endX:Int; | |
private var endY:Int; | |
public function new(tilemap:FlxTilemap, x1:Int, y1:Int, x2:Int, y2:Int) | |
{ | |
this.tilemap = tilemap; | |
this.curX = tilemap.clampX(cast(Math.min(x1, x2), Int)); | |
this.curY = tilemap.clampY(cast(Math.min(y1, y2), Int)); | |
this.endX = tilemap.clampX(cast(Math.max(x1, x2), Int)); | |
this.endY = tilemap.clampY(cast(Math.max(y1, y2), Int)); | |
} | |
/* ... */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment