diff --git a/src/physics/arcade/Body.js b/src/physics/arcade/Body.js index bb3585cac..63497e43f 100644 --- a/src/physics/arcade/Body.js +++ b/src/physics/arcade/Body.js @@ -486,16 +486,6 @@ var Body = new Class({ */ this.onOverlap = false; - /** - * Whether the simulation emits an `bounce` event when this Body bounces. - * - * @name Phaser.Physics.Arcade.StaticBody#onBounce - * @type {boolean} - * @default false - * @since 3.80.0 - */ - this.onBounce = false; - /** * The absolute maximum velocity of this body, in pixels per second. * The horizontal and vertical components are applied separately. @@ -1232,11 +1222,6 @@ var Body = new Class({ var blocked = this.blocked; this.world.emit(Events.WORLD_BOUNDS, this, blocked.up, blocked.down, blocked.left, blocked.right); - - if (this.onBounce && this.bounce.length()) - { - this.emit(Events.BOUNCE, this); - } } }, diff --git a/src/physics/arcade/StaticBody.js b/src/physics/arcade/StaticBody.js index 25c7de0d3..519881140 100644 --- a/src/physics/arcade/StaticBody.js +++ b/src/physics/arcade/StaticBody.js @@ -295,17 +295,6 @@ var StaticBody = new Class({ */ this.onOverlap = false; - /** - * Whether the simulation emits an `bounce` event when this StaticBody bounces. - * Always false for a Static Body. (Static Bodies never bounce and never trigger a `bounce` event.) - * - * @name Phaser.Physics.Arcade.StaticBody#onBounce - * @type {boolean} - * @default false - * @since 3.80.0 - */ - this.onBounce = false; - /** * The StaticBody's inertia, relative to a default unit (1). With `bounce`, this affects the exchange of momentum (velocities) during collisions. * diff --git a/src/physics/arcade/World.js b/src/physics/arcade/World.js index 8a8367598..aee1a4057 100644 --- a/src/physics/arcade/World.js +++ b/src/physics/arcade/World.js @@ -1469,16 +1469,6 @@ var World = new Class({ else if (body1.onCollide || body2.onCollide) { this.emit(Events.COLLIDE, body1.gameObject, body2.gameObject, body1, body2); - - if (body1.onBounce && body1.bounce.length()) - { - this.emit(Events.BOUNCE, body1); - } - - if (body2.onBounce && body2.bounce.length()) - { - this.emit(Events.BOUNCE, body2); - } } } diff --git a/src/physics/arcade/events/BOUNCE_EVENT.js b/src/physics/arcade/events/BOUNCE_EVENT.js deleted file mode 100644 index 3f7a6bfbb..000000000 --- a/src/physics/arcade/events/BOUNCE_EVENT.js +++ /dev/null @@ -1,24 +0,0 @@ -/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Arcade Physics World Bounce Event. - * - * This event is dispatched by an Arcade Physics World instance if a body collides with a body or world bounds - * _and_ it has its [onBounce]{@link Phaser.Physics.Arcade.Body#onBounce} property set to `true` while having - * a bounce magnitude above 0. - * - * It provides an alternative means to handling collide events rather than using the callback approach. - * - * Listen to it from a Scene using: `this.physics.world.on('bounce', listener)`. - * - * @event Phaser.Physics.Arcade.Events#BOUNCE - * @type {string} - * @since 3.80.0 - * - * @param {Phaser.Physics.Arcade.Body} body - The Arcade Physics Body that bounced. - */ -module.exports = 'bounce'; diff --git a/src/physics/arcade/events/index.js b/src/physics/arcade/events/index.js index 961445211..26e23f3fa 100644 --- a/src/physics/arcade/events/index.js +++ b/src/physics/arcade/events/index.js @@ -10,7 +10,6 @@ module.exports = { - BOUNCE: require('./BOUNCE_EVENT'), COLLIDE: require('./COLLIDE_EVENT'), OVERLAP: require('./OVERLAP_EVENT'), PAUSE: require('./PAUSE_EVENT'),