Added back z calculation into depth sorting, though it's still not quite right.

This commit is contained in:
lewster32
2014-08-08 20:46:00 +01:00
parent a8965ce9e3
commit 294a486277
6 changed files with 9 additions and 8 deletions
+2 -2
View File
@@ -53,7 +53,7 @@ Phaser.Plugin.Isometric = function (game, parent) {
Phaser.Plugin.Isometric.prototype = Object.create(Phaser.Plugin.prototype);
Phaser.Plugin.Isometric.prototype.constructor = Phaser.Plugin.Isometric;
Phaser.Plugin.Isometric.VERSION = '0.7.3';
Phaser.Plugin.Isometric.VERSION = '0.7.4';
// Directional consts
Phaser.Plugin.Isometric.UP = 0;
@@ -829,7 +829,7 @@ Object.defineProperty(Phaser.Plugin.Isometric.IsoSprite.prototype, "isoPosition"
Object.defineProperty(Phaser.Plugin.Isometric.IsoSprite.prototype, "depth", {
get: function () {
if (this._depthChanged === true) {
this._depth = (this._isoPosition.x + this._isoPosition.y);
this._depth = (this._isoPosition.x + this._isoPosition.y) + (this._isoPosition.z * 0.95);
this._depthChanged = false;
}
return this._depth;
File diff suppressed because one or more lines are too long