2
0
ncannasse 11 жил өмнө
parent
commit
5754457cf1
1 өөрчлөгдсөн 10 нэмэгдсэн , 0 устгасан
  1. 10 0
      h2d/Tile.hx

+ 10 - 0
h2d/Tile.hx

@@ -97,6 +97,16 @@ class Tile {
 		y = Std.int(v * tex.height);
 		y = Std.int(v * tex.height);
 	}
 	}
 
 
+	public function flipX() {
+		var tmp = u; u = u2; u2 = tmp;
+		dx = -dx - width;
+	}
+
+	public function flipY() {
+		var tmp = v; v = v2; v2 = tmp;
+		dy = -dy - height;
+	}
+
 	public function dispose() {
 	public function dispose() {
 		if( innerTex != null ) innerTex.dispose();
 		if( innerTex != null ) innerTex.dispose();
 		innerTex = null;
 		innerTex = null;