mirror of
https://github.com/photonstorm/phaser
synced 2024-12-23 03:23:42 +00:00
worldToTile fixed
This commit is contained in:
parent
aae73c3cb8
commit
e6d468cda7
8 changed files with 21959 additions and 223328 deletions
18551
dist/phaser-arcade-physics.js
vendored
18551
dist/phaser-arcade-physics.js
vendored
File diff suppressed because it is too large
Load diff
2
dist/phaser-arcade-physics.min.js
vendored
2
dist/phaser-arcade-physics.min.js
vendored
File diff suppressed because one or more lines are too long
203022
dist/phaser-facebook-instant-games.js
vendored
203022
dist/phaser-facebook-instant-games.js
vendored
File diff suppressed because it is too large
Load diff
1
dist/phaser-facebook-instant-games.min.js
vendored
1
dist/phaser-facebook-instant-games.min.js
vendored
File diff suppressed because one or more lines are too long
23703
dist/phaser.js
vendored
23703
dist/phaser.js
vendored
File diff suppressed because it is too large
Load diff
2
dist/phaser.min.js
vendored
2
dist/phaser.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -24,6 +24,9 @@
|
||||||
"dist": "webpack --config config/webpack.dist.config.js",
|
"dist": "webpack --config config/webpack.dist.config.js",
|
||||||
"distfb": "webpack --config config/webpack.fb.dist.config.js",
|
"distfb": "webpack --config config/webpack.fb.dist.config.js",
|
||||||
"distfull": "npm run dist && npm run distfb",
|
"distfull": "npm run dist && npm run distfb",
|
||||||
|
"distT": "webpack --config config/webpack.dist.config.js && npm run toT",
|
||||||
|
"toT": "@powershell Copy-Item ./dist/phaser.min.js ../phasertest/phaser.min.js",
|
||||||
|
"toT2": "@powershell Copy-Item ./dist/phaser.js ../phasertest/phaser.min.js",
|
||||||
"plugin.cam3d": "webpack --config plugins/camera3d/webpack.config.js",
|
"plugin.cam3d": "webpack --config plugins/camera3d/webpack.config.js",
|
||||||
"plugin.spine": "webpack --config plugins/spine/webpack.config.js",
|
"plugin.spine": "webpack --config plugins/spine/webpack.config.js",
|
||||||
"plugin.spine.dist": "webpack --config plugins/spine/webpack.auto.dist.config.js",
|
"plugin.spine.dist": "webpack --config plugins/spine/webpack.auto.dist.config.js",
|
||||||
|
|
|
@ -80,7 +80,10 @@ var IsoWorldToTileXY = function (worldX, worldY, snapToFloor, point, camera, lay
|
||||||
|
|
||||||
tileWidth *= tilemapLayer.scaleX;
|
tileWidth *= tilemapLayer.scaleX;
|
||||||
}
|
}
|
||||||
|
worldX -= tileWidth/2;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
point.x = snapToFloor
|
point.x = snapToFloor
|
||||||
? Math.floor((worldX / (tileWidth / 2) + worldY / (tileHeight / 2)) / 2)
|
? Math.floor((worldX / (tileWidth / 2) + worldY / (tileHeight / 2)) / 2)
|
||||||
: ((worldX / (tileWidth / 2) + worldY / (tileHeight / 2)) / 2);
|
: ((worldX / (tileWidth / 2) + worldY / (tileHeight / 2)) / 2);
|
||||||
|
|
Loading…
Reference in a new issue