Skip to content

Commit 8a01ae1

Browse files
committed
Call the component directly to avoid lots of function diving
1 parent 536f08a commit 8a01ae1

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

src/physics/arcade/World.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ var FuzzyGreaterThan = require('../../math/fuzzy/GreaterThan');
1818
var FuzzyLessThan = require('../../math/fuzzy/LessThan');
1919
var GetOverlapX = require('./GetOverlapX');
2020
var GetOverlapY = require('./GetOverlapY');
21+
var GetTilesWithinWorldXY = require('../../tilemaps/components/GetTilesWithinWorldXY');
2122
var GetValue = require('../../utils/object/GetValue');
2223
var MATH_CONST = require('../../math/const');
2324
var ProcessQueue = require('../../structs/ProcessQueue');
@@ -2201,7 +2202,7 @@ var World = new Class({
22012202
h += yDiff;
22022203
}
22032204

2204-
var mapData = tilemapLayer.getTilesWithinWorldXY(x, y, w, h);
2205+
var mapData = GetTilesWithinWorldXY(x, y, w, h, null, tilemapLayer.scene.cameras.main, tilemapLayer.layer);
22052206

22062207
if (mapData.length === 0)
22072208
{
@@ -2253,8 +2254,8 @@ var World = new Class({
22532254
tileWorldRect.left = point.x;
22542255
tileWorldRect.top = point.y;
22552256

2256-
// If the map's base tile size differs from the layer's tile size, only the top of the rect
2257-
// needs to be adjusted since its origin is (0, 1).
2257+
// If the maps base tile size differs from the layer tile size, only the top of the rect
2258+
// needs to be adjusted since its origin is (0, 1).
22582259
if (tile.baseHeight !== tile.height)
22592260
{
22602261
tileWorldRect.top -= (tile.height - tile.baseHeight) * tilemapLayer.scaleY;
@@ -2331,7 +2332,7 @@ var World = new Class({
23312332
* @method Phaser.Physics.Arcade.World#wrap
23322333
* @since 3.3.0
23332334
*
2334-
* @param {*} object - A Game Object, a Group, an object with `x` and `y` coordinates, or an array of such objects.
2335+
* @param {any} object - A Game Object, a Group, an object with `x` and `y` coordinates, or an array of such objects.
23352336
* @param {number} [padding=0] - An amount added to each boundary edge during the operation.
23362337
*/
23372338
wrap: function (object, padding)

0 commit comments

Comments
 (0)