浏览代码

draw debug when tile is null

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

+ 2 - 0
h2d/Tools.hx

@@ -44,6 +44,8 @@ class Tools {
 			BITMAP_OBJ = b;
 			BITMAP_OBJ = b;
 		}
 		}
 		setBlendMode(b.material, blendMode);
 		setBlendMode(b.material, blendMode);
+		if( tile == null )
+			tile = new Tile(emptyTexture(), 0, 0, 5, 5);
 		var tmp = TMP_VECTOR;
 		var tmp = TMP_VECTOR;
 		// adds 1/10 pixel size to prevent precision loss after scaling
 		// adds 1/10 pixel size to prevent precision loss after scaling
 		tmp.x = tile.width + 0.1;
 		tmp.x = tile.width + 0.1;