diff --git a/src/cameras/2d/typedefs/JSONCamera.js b/src/cameras/2d/typedefs/JSONCamera.js index be344210b..8a86a5624 100644 --- a/src/cameras/2d/typedefs/JSONCamera.js +++ b/src/cameras/2d/typedefs/JSONCamera.js @@ -9,7 +9,7 @@ * @property {number} height - The height size of camera * @property {number} zoom - The zoom of camera * @property {number} rotation - The rotation of camera - * @property {boolean} roundPixels - The round pixels st status of camera + * @property {boolean} roundPixels - The round pixels indicate the status of the camera * @property {number} scrollX - The horizontal scroll of camera * @property {number} scrollY - The vertical scroll of camera * @property {string} backgroundColor - The background color of camera diff --git a/src/core/Config.js b/src/core/Config.js index 5c987bd4f..4d8641536 100644 --- a/src/core/Config.js +++ b/src/core/Config.js @@ -312,7 +312,7 @@ var Config = new Class({ // If you do: { banner: false } it won't display any banner at all /** - * @const {boolean} Phaser.Core.Config#hideBanner - Don't write the banner line to the console.log. See `Phaser.TYpes.Core.BannerConfig` for details of this object. + * @const {boolean} Phaser.Core.Config#hideBanner - Don't write the banner line to the console.log. See `Phaser.Types.Core.BannerConfig` for details of this object. */ this.hideBanner = (GetValue(config, 'banner', null) === false); diff --git a/src/gameobjects/container/Container.js b/src/gameobjects/container/Container.js index 2c2e45ae2..dad0c1abb 100644 --- a/src/gameobjects/container/Container.js +++ b/src/gameobjects/container/Container.js @@ -818,6 +818,7 @@ var Container = new Class({ /** * Moves a Game Object above another one within this Container. + * If the Game Object is already above the other, it isn't moved. * * These 2 Game Objects must already be children of this Container. * @@ -841,6 +842,7 @@ var Container = new Class({ /** * Moves a Game Object below another one within this Container. + * If the Game Object is already below the other, it isn't moved. * * These 2 Game Objects must already be children of this Container. * diff --git a/src/physics/arcade/World.js b/src/physics/arcade/World.js index 688cc7af0..fe7328439 100644 --- a/src/physics/arcade/World.js +++ b/src/physics/arcade/World.js @@ -1395,7 +1395,7 @@ var World = new Class({ } // They overlap. Is there a custom process callback? If it returns true then we can carry on, otherwise we should abort. - if (processCallback && processCallback.call(callbackContext, body1.gameObject, body2.gameObject) === false) + if (processCallback && processCallback.call(callbackContext, (body1.gameObject || body1), (body2.gameObject || body2)) === false) { return result; } diff --git a/src/physics/arcade/typedefs/ArcadePhysicsCallback.js b/src/physics/arcade/typedefs/ArcadePhysicsCallback.js index b5af5ef7f..10b5ab647 100644 --- a/src/physics/arcade/typedefs/ArcadePhysicsCallback.js +++ b/src/physics/arcade/typedefs/ArcadePhysicsCallback.js @@ -7,6 +7,10 @@ * * For all other cases, `object1` and `object2` match the same arguments in `collide()` or `overlap()`. * - * @param {(Phaser.Types.Physics.Arcade.GameObjectWithBody|Phaser.Tilemaps.Tile)} object1 - The first Game Object. - * @param {(Phaser.Types.Physics.Arcade.GameObjectWithBody|Phaser.Tilemaps.Tile)} object2 - The second Game Object. - */ + * Note you can receive back only a body if you passed in a body directly. + * + * You should only do this if the body intentionally has no associated game object (sprite, .etc). + * + * @param {(Phaser.Types.Physics.Arcade.GameObjectWithBody|Phaser.Physics.Arcade.Body|Phaser.Tilemaps.Tile)} object1 - The first Game Object. + * @param {(Phaser.Types.Physics.Arcade.GameObjectWithBody|Phaser.Physics.Arcade.Body|Phaser.Tilemaps.Tile)} object2 - The second Game Object. + */ \ No newline at end of file diff --git a/src/scene/SceneManager.js b/src/scene/SceneManager.js index e17944540..6c8abbbec 100644 --- a/src/scene/SceneManager.js +++ b/src/scene/SceneManager.js @@ -1536,6 +1536,7 @@ var SceneManager = new Class({ /** * Moves a Scene so it is immediately above another Scene in the Scenes list. + * If the Scene is already above the other, it isn't moved. * * This means it will render over the top of the other Scene. * @@ -1583,6 +1584,7 @@ var SceneManager = new Class({ /** * Moves a Scene so it is immediately below another Scene in the Scenes list. + * If the Scene is already below the other, it isn't moved. * * This means it will render behind the other Scene. * diff --git a/src/scene/ScenePlugin.js b/src/scene/ScenePlugin.js index 3047fb738..674e2ea05 100644 --- a/src/scene/ScenePlugin.js +++ b/src/scene/ScenePlugin.js @@ -836,9 +836,10 @@ var ScenePlugin = new Class({ }, /** - * Swaps the position of two scenes in the Scenes list, so that Scene B is directly above Scene A. + * Moves a Scene so it is immediately above another Scene in the Scenes list. + * If the Scene is already above the other, it isn't moved. * - * This controls the order in which they are rendered and updated. + * This means it will render over the top of the other Scene. * * @method Phaser.Scenes.ScenePlugin#moveAbove * @since 3.2.0 @@ -864,9 +865,10 @@ var ScenePlugin = new Class({ }, /** - * Swaps the position of two scenes in the Scenes list, so that Scene B is directly below Scene A. + * Moves a Scene so it is immediately below another Scene in the Scenes list. + * If the Scene is already below the other, it isn't moved. * - * This controls the order in which they are rendered and updated. + * This means it will render behind the other Scene. * * @method Phaser.Scenes.ScenePlugin#moveBelow * @since 3.2.0 diff --git a/src/structs/List.js b/src/structs/List.js index f978d1ce4..2dc2bc4c9 100644 --- a/src/structs/List.js +++ b/src/structs/List.js @@ -356,7 +356,9 @@ var List = new Class({ }, /** - * Moves the given array element above another one in the array. + * Moves an item above another one in the List. + * If the given item is already above the other, it isn't moved. + * Above means toward the end of the List. * * @method Phaser.Structs.List#moveAbove * @since 3.55.0 @@ -372,7 +374,9 @@ var List = new Class({ }, /** - * Moves the given array element below another one in the array. + * Moves an item below another one in the List. + * If the given item is already below the other, it isn't moved. + * Below means toward the start of the List. * * @method Phaser.Structs.List#moveBelow * @since 3.55.0 diff --git a/src/utils/array/MoveAbove.js b/src/utils/array/MoveAbove.js index cf5241bbe..eeb7f31ca 100644 --- a/src/utils/array/MoveAbove.js +++ b/src/utils/array/MoveAbove.js @@ -6,6 +6,8 @@ /** * Moves the given array element above another one in the array. + * If the given element is already above the other, it isn't moved. + * Above means toward the end of the array. * The array is modified in-place. * * @function Phaser.Utils.Array.MoveAbove diff --git a/src/utils/array/MoveBelow.js b/src/utils/array/MoveBelow.js index 6d84afe33..cd6c33f37 100644 --- a/src/utils/array/MoveBelow.js +++ b/src/utils/array/MoveBelow.js @@ -6,6 +6,8 @@ /** * Moves the given array element below another one in the array. + * If the given element is already below the other, it isn't moved. + * Below means toward the start of the array. * The array is modified in-place. * * @function Phaser.Utils.Array.MoveBelow