Browse Source

added canEmitInstance()

Nicolas Cannasse 5 năm trước cách đây
mục cha
commit
e8477411f3
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  1. 4 0
      h3d/scene/MeshBatch.hx

+ 4 - 0
h3d/scene/MeshBatch.hx

@@ -256,6 +256,10 @@ class MeshBatch extends Mesh {
 		curInstances++;
 	}
 
+	public inline function canEmitInstance() {
+		return curInstances < maxInstances;
+	}
+
 	override function sync(ctx:RenderContext) {
 		super.sync(ctx);
 		if( curInstances == 0 ) return;