fix light2d using tileset from dynamictilemaplayer (#4167,#4079)

This commit is contained in:
Kolja Kutschera 2019-10-26 00:56:43 +02:00
parent c25331cf30
commit c893ca6186

View file

@ -250,7 +250,14 @@ var ForwardDiffuseLightPipeline = new Class({
}
else if (gameObject.tileset)
{
normalTexture = gameObject.tileset.image.dataSource[0];
if (Array.isArray(gameObject.tileset))
{
normalTexture = gameObject.tileset[0].image.dataSource[0];
}
else
{
normalTexture = gameObject.tileset.image.dataSource[0];
}
}
if (!normalTexture)