mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-01 07:42:38 +08:00
Merge pull request #2115 from knoxHuang/fix_bug
fix tilemap layer is empty error
This commit is contained in:
@@ -50,7 +50,7 @@ proto.rendering = function (ctx, scaleX, scaleY) {
|
||||
tiles = node.tiles,
|
||||
alpha = node._opacity / 255;
|
||||
|
||||
if (!tiles || alpha <= 0) {
|
||||
if (!tiles || alpha <= 0 || !node.tileset) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -72,9 +72,10 @@ proto.uploadData = function (f32buffer, ui32buffer, vertexDataOffset) {
|
||||
|
||||
var node = this._node,
|
||||
layerOrientation = node.layerOrientation,
|
||||
tiles = node.tiles;
|
||||
tiles = node.tiles,
|
||||
alpha = node._opacity / 255;
|
||||
|
||||
if (!tiles) {
|
||||
if (!tiles || alpha <= 0 || !node.tileset) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user