ncannasse 8 年之前
父节点
当前提交
ad50d07e83
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8 0
      h2d/Particles.hx

+ 8 - 0
h2d/Particles.hx

@@ -222,6 +222,14 @@ class ParticleGroup {
 
 	function makeTiles() {
 		var t : h2d.Tile;
+
+		// hide : create default particle
+		if( h3d.Engine.getCurrent() == null ) {
+			tiles = [];
+			needRebuild = true;
+			return;
+		}
+
 		if( texture == null )
 			t = h2d.Tile.fromColor(0xFFFFFF, 16, 16);
 		else