Re-done the pointer handler so it respects the top-most rendered sprite in priority to anything below it, for both mouse over and click events.

This commit is contained in:
Richard Davey
2013-06-03 12:03:34 +01:00
parent 1c37cd1a96
commit 82d4ba4538
18 changed files with 689 additions and 141 deletions
+1 -2
View File
@@ -88,8 +88,7 @@ module Phaser {
var data: FrameData = new FrameData();
// By this stage frames is a fully parsed array
var frames = json;
var frames = json['frames'];
var newFrame: Frame;
for (var i = 0; i < frames.length; i++)
+1 -1
View File
@@ -89,7 +89,7 @@ module Phaser {
* @param data {object} Extra texture atlas data.
* @param atlasData {object} Texture atlas frames data.
*/
public addTextureAtlas(key: string, url: string, data, atlasData, format) {
public addTextureAtlas(key: string, url: string, data, atlasData, format: number) {
this._images[key] = { url: url, data: data, spriteSheet: true };
+1 -1
View File
@@ -434,7 +434,7 @@ module Phaser {
var data = JSON.parse(this._xhr.response);
var file = this._fileList[key];
this._game.cache.addTextureAtlas(file.key, file.url, file.data, data['frames'], file.format);
this._game.cache.addTextureAtlas(file.key, file.url, file.data, data, file.format);
this.nextFile(key, true);