Browse Source

Add ZGroup.clear() (#251)

Pascal Peridont 8 years ago
parent
commit
ccfa14dfb4
1 changed files with 6 additions and 0 deletions
  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)