Kaynağa Gözat

changed center()

Nicolas Cannasse 11 yıl önce
ebeveyn
işleme
d1220f92e2
1 değiştirilmiş dosya ile 2 ekleme ve 2 silme
  1. 2 2
      h2d/Tile.hx

+ 2 - 2
h2d/Tile.hx

@@ -64,8 +64,8 @@ class Tile {
 		return new Tile(innerTex, this.x + x, this.y + y, w, h, dx, dy);
 	}
 
-	public function center(dx, dy) {
-		return sub(0, 0, width, height, -dx, -dy);
+	public function center() {
+		return sub(0, 0, width, height, -(width>>1), -(height>>1));
 	}
 
 	public function flipX() {