diff --git a/src/gameobjects/tilemap/dynamiclayer/DynamicTilemapLayer.js b/src/gameobjects/tilemap/dynamiclayer/DynamicTilemapLayer.js index c3e2dea47..12a351188 100644 --- a/src/gameobjects/tilemap/dynamiclayer/DynamicTilemapLayer.js +++ b/src/gameobjects/tilemap/dynamiclayer/DynamicTilemapLayer.js @@ -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(); diff --git a/src/gameobjects/tilemap/staticlayer/StaticTilemapLayer.js b/src/gameobjects/tilemap/staticlayer/StaticTilemapLayer.js index 917c103fd..442e67c37 100644 --- a/src/gameobjects/tilemap/staticlayer/StaticTilemapLayer.js +++ b/src/gameobjects/tilemap/staticlayer/StaticTilemapLayer.js @@ -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(); diff --git a/src/input/local/inc/ProcessDragEvents.js b/src/input/local/inc/ProcessDragEvents.js index d09225bc1..40360b25c 100644 --- a/src/input/local/inc/ProcessDragEvents.js +++ b/src/input/local/inc/ProcessDragEvents.js @@ -208,11 +208,12 @@ var ProcessDragEvents = function (pointer, time) this.emit('dragenter', pointer, gameObject, input.target); } - var dragEvent = new InputEvent.DRAG(pointer, gameObject); + var dragX = pointer.x - gameObject.input.dragX; + var dragY = pointer.y - gameObject.input.dragY; - gameObject.emit('drag', pointer, dragEvent.dragX, dragEvent.dragY); + gameObject.emit('drag', pointer, dragX, dragY); - this.emit('drag', dragEvent); + this.emit('drag', pointer, gameObject, dragX, dragY); } }