Skip to content

Commit 2ecaad5

Browse files
committed
Fixes use of static keyword. Fix phaserjs#4458
1 parent f4f33ed commit 2ecaad5

3 files changed

Lines changed: 13 additions & 13 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ Notes:
9090

9191
My thanks to the following for helping with the Phaser 3 Examples, Docs and TypeScript definitions, either by reporting errors, fixing them or helping author the docs:
9292

93-
@sky-coding @G-Rath @S4n60w3n @rootasjey @englercj @josephmbustamante @Jason-Cooke @Zamiell @krzysztof-grzybek @S4n60w3n
93+
@sky-coding @G-Rath @S4n60w3n @rootasjey @englercj @josephmbustamante @Jason-Cooke @Zamiell @krzysztof-grzybek @S4n60w3n @m31271n
9494

9595

9696
## Version 3.16.2 - Ishikawa - 11th February 2019

src/physics/arcade/ArcadePhysics.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -559,14 +559,14 @@ var ArcadePhysics = new Class({
559559
* @param {number} y - The top-left y coordinate of the area to search within.
560560
* @param {number} width - The width of the area to search within.
561561
* @param {number} height - The height of the area to search within.
562-
* @param {boolean} [dynamic=true] - Should the search include Dynamic Bodies?
563-
* @param {boolean} [static=false] - Should the search include Static Bodies?
562+
* @param {boolean} [includeDynamic=true] - Should the search include Dynamic Bodies?
563+
* @param {boolean} [includeStatic=false] - Should the search include Static Bodies?
564564
*
565565
* @return {(Phaser.Physics.Arcade.Body[]|Phaser.Physics.Arcade.StaticBody[])} An array of bodies that overlap with the given area.
566566
*/
567-
overlapRect: function (x, y, width, height, dynamic, static)
567+
overlapRect: function (x, y, width, height, includeDynamic, includeStatic)
568568
{
569-
return OverlapRect(this.world, x, y, width, height, dynamic, static);
569+
return OverlapRect(this.world, x, y, width, height, includeDynamic, includeStatic);
570570
},
571571

572572
/**

src/physics/arcade/components/OverlapRect.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@
1515
* @param {number} y - The top-left y coordinate of the area to search within.
1616
* @param {number} width - The width of the area to search within.
1717
* @param {number} height - The height of the area to search within.
18-
* @param {boolean} [dynamic=true] - Should the search include Dynamic Bodies?
19-
* @param {boolean} [static=false] - Should the search include Static Bodies?
18+
* @param {boolean} [includeDynamic=true] - Should the search include Dynamic Bodies?
19+
* @param {boolean} [includeStatic=false] - Should the search include Static Bodies?
2020
*
2121
* @return {(Phaser.Physics.Arcade.Body[]|Phaser.Physics.Arcade.StaticBody[])} An array of bodies that overlap with the given area.
2222
*/
23-
var OverlapRect = function (world, x, y, width, height, dynamic, static)
23+
var OverlapRect = function (world, x, y, width, height, includeDynamic, includeStatic)
2424
{
25-
if (dynamic === undefined) { dynamic = true; }
26-
if (static === undefined) { static = false; }
25+
if (includeDynamic === undefined) { includeDynamic = true; }
26+
if (includeStatic === undefined) { includeStatic = false; }
2727

2828
var dynamicBodies = [];
2929
var staticBodies = [];
@@ -35,16 +35,16 @@ var OverlapRect = function (world, x, y, width, height, dynamic, static)
3535
minMax.maxX = x + width;
3636
minMax.maxY = y + height;
3737

38-
if (static)
38+
if (includeStatic)
3939
{
4040
staticBodies = world.staticTree.search(minMax);
4141
}
4242

43-
if (dynamic && world.useTree)
43+
if (includeDynamic && world.useTree)
4444
{
4545
dynamicBodies = world.tree.search(minMax);
4646
}
47-
else if (dynamic)
47+
else if (includeDynamic)
4848
{
4949
var bodies = world.bodies;
5050

0 commit comments

Comments
 (0)