ncannasse 8 år sedan
förälder
incheckning
ad50d07e83
1 ändrade filer med 8 tillägg och 0 borttagningar
  1. 8 0
      h2d/Particles.hx

+ 8 - 0
h2d/Particles.hx

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