소스 검색

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)