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 -1
View File
@@ -100,5 +100,6 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-jsdoc');
grunt.registerTask('default', ['concat', 'jshint', 'uglify', 'jsdoc:docstrap']);
grunt.registerTask('default', ['concat', 'jshint', 'uglify']);
grunt.registerTask('docs', ['jsdoc:docstrap']);
};
+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
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "phaser-plugin-isometric",
"version": "0.7.3",
"version": "0.7.4",
"devDependencies": {
"grunt": "~0.4.5",
"grunt-contrib-clean": "^0.5.0",
+1 -1
View File
@@ -167,7 +167,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;
+1 -1
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;