mirror of
https://github.com/wassname/phaser-plugin-isometric.git
synced 2026-09-09 11:28:50 +08:00
Added back z calculation into depth sorting, though it's still not quite right.
This commit is contained in:
+2
-1
@@ -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']);
|
||||
};
|
||||
Vendored
+2
-2
@@ -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;
|
||||
|
||||
Vendored
+2
-2
File diff suppressed because one or more lines are too long
+1
-1
@@ -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
@@ -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
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user