Browse Source

Add ZGroup.clear() (#251)

Pascal Peridont 8 năm trước cách đây
mục cha
commit
ccfa14dfb4
1 tập tin đã thay đổi với 6 bổ sung0 xóa
  1. 6 0
      h2d/ZGroup.hx

+ 6 - 0
h2d/ZGroup.hx

@@ -108,6 +108,12 @@ class DepthMap {
 	inline public function getDepth(spr : Sprite) {
 		return map.get(spr).depth;
 	}
+
+	public function clear(){
+		map = new Map();
+		free = null;
+		first = null;
+	}
 }
 
 @:access(h2d.RenderContext)