UNPKG

phaser

Version:

A fast, free and fun HTML5 Game Framework for Desktop and Mobile web browsers.

73 lines (61 loc) 1.51 kB
/** * @author Richard Davey <rich@photonstorm.com> * @copyright 2018 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ /** * [description] * * @name Phaser.Physics.Impact.Components.Bounce * @since 3.0.0 */ var Bounce = { /** * [description] * * @method Phaser.Physics.Impact.Components.Bounce#setBounce * @since 3.0.0 * * @param {number} value - [description] * * @return {Phaser.GameObjects.GameObject} This Game Object. */ setBounce: function (value) { this.body.bounciness = value; return this; }, /** * [description] * * @method Phaser.Physics.Impact.Components.Bounce#setMinBounceVelocity * @since 3.0.0 * * @param {number} value - [description] * * @return {Phaser.GameObjects.GameObject} This Game Object. */ setMinBounceVelocity: function (value) { this.body.minBounceVelocity = value; return this; }, /** * [description] * * @name Phaser.Physics.Impact.Components.Bounce#bounce * @type {number} * @since 3.0.0 */ bounce: { get: function () { return this.body.bounciness; }, set: function (value) { this.body.bounciness = value; } } }; module.exports = Bounce;