Tilemap layers now initialize their alpha from LayerData

This makes it easy to import layer alphas from Tiled
This commit is contained in:
Michael Hadley 2018-01-14 16:15:53 -06:00
parent 696643051a
commit f86298b8d2
2 changed files with 2 additions and 0 deletions

View file

@ -89,6 +89,7 @@ var DynamicTilemapLayer = new Class({
*/
this.culledTiles = [];
this.setAlpha(this.layer.alpha);
this.setTexture(tileset.image.key);
this.setPosition(x, y);
this.setSizeToFrame();

View file

@ -98,6 +98,7 @@ var StaticTilemapLayer = new Class({
this.dirty = true;
this.vertexCount = 0;
this.setAlpha(this.layer.alpha);
this.setTexture(tileset.image.key);
this.setPosition(x, y);
this.setSizeToFrame();