mirror of
https://github.com/photonstorm/phaser
synced 2024-12-23 03:23:42 +00:00
preparing WIP PR 2
This commit is contained in:
parent
ccbff39074
commit
d6489d1146
1 changed files with 3 additions and 2 deletions
|
@ -733,8 +733,9 @@ var Tile = new Class({
|
||||||
this.pixelY = this.y * this.baseHeight;
|
this.pixelY = this.y * this.baseHeight;
|
||||||
console.log("orthopix "+this.pixelX+","+this.pixelY)
|
console.log("orthopix "+this.pixelX+","+this.pixelY)
|
||||||
} else if (this.orientation === "isometric" ||true) {
|
} else if (this.orientation === "isometric" ||true) {
|
||||||
// for the image to be centered we have to move the image to the right.
|
// for the image to be centered we have to move the image to the right with the camera !
|
||||||
this.pixelX = this.layer.widthInPixels/2 + (this.x - this.y) * this.baseWidth *0.5;
|
// this is crucial for wordtotile, tiletoworld to work.
|
||||||
|
this.pixelX = (this.x - this.y) * this.baseWidth *0.5;
|
||||||
this.pixelY = (this.x + this.y) * this.baseHeight *0.5;
|
this.pixelY = (this.x + this.y) * this.baseHeight *0.5;
|
||||||
console.log("isopix "+this.pixelX+","+this.pixelY)
|
console.log("isopix "+this.pixelX+","+this.pixelY)
|
||||||
// console.log(this)
|
// console.log(this)
|
||||||
|
|
Loading…
Reference in a new issue