浏览代码

Add ZGroup.clear() (#251)

Pascal Peridont 8 年之前
父节点
当前提交
ccfa14dfb4
共有 1 个文件被更改,包括 6 次插入0 次删除
  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)