2018-02-12 16:01:20 +00:00
|
|
|
/**
|
|
|
|
* @author Richard Davey <rich@photonstorm.com>
|
2019-01-15 16:20:22 +00:00
|
|
|
* @copyright 2019 Photon Storm Ltd.
|
2019-05-10 15:15:04 +00:00
|
|
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
2018-02-12 16:01:20 +00:00
|
|
|
*/
|
|
|
|
|
2018-02-09 15:23:33 +00:00
|
|
|
/**
|
|
|
|
* Collision Types - Determine if and how entities collide with each other.
|
2018-03-18 23:42:09 +00:00
|
|
|
*
|
2018-02-09 15:23:33 +00:00
|
|
|
* In ACTIVE vs. LITE or FIXED vs. ANY collisions, only the "weak" entity moves,
|
|
|
|
* while the other one stays fixed. In ACTIVE vs. ACTIVE and ACTIVE vs. PASSIVE
|
|
|
|
* collisions, both entities are moved. LITE or PASSIVE entities don't collide
|
|
|
|
* with other LITE or PASSIVE entities at all. The behavior for FIXED vs.
|
|
|
|
* FIXED collisions is undefined.
|
2018-03-18 23:42:09 +00:00
|
|
|
*
|
2019-02-12 15:01:54 +00:00
|
|
|
* @namespace Phaser.Physics.Impact.COLLIDES
|
2018-10-10 09:49:13 +00:00
|
|
|
* @memberof Phaser.Physics.Impact
|
2018-03-21 14:41:34 +00:00
|
|
|
* @since 3.0.0
|
2018-02-09 15:23:33 +00:00
|
|
|
*/
|
2019-02-12 15:01:54 +00:00
|
|
|
|
2017-06-21 23:47:35 +00:00
|
|
|
module.exports = {
|
|
|
|
|
2018-02-09 15:23:33 +00:00
|
|
|
/**
|
|
|
|
* Never collides.
|
2018-03-18 23:42:09 +00:00
|
|
|
*
|
2018-02-09 15:23:33 +00:00
|
|
|
* @name Phaser.Physics.Impact.COLLIDES.NEVER
|
2019-02-12 15:01:54 +00:00
|
|
|
* @type {integer}
|
|
|
|
* @const
|
2019-02-12 12:22:25 +00:00
|
|
|
* @since 3.0.0
|
2018-02-09 15:23:33 +00:00
|
|
|
*/
|
2017-06-21 23:47:35 +00:00
|
|
|
NEVER: 0,
|
2018-02-09 15:23:33 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Lite collision.
|
2018-03-18 23:42:09 +00:00
|
|
|
*
|
2018-02-09 15:23:33 +00:00
|
|
|
* @name Phaser.Physics.Impact.COLLIDES.LITE
|
2019-02-12 15:01:54 +00:00
|
|
|
* @type {integer}
|
|
|
|
* @const
|
2019-02-12 12:22:25 +00:00
|
|
|
* @since 3.0.0
|
2018-02-09 15:23:33 +00:00
|
|
|
*/
|
2017-06-21 23:47:35 +00:00
|
|
|
LITE: 1,
|
2018-02-09 15:23:33 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Passive collision.
|
2018-03-18 23:42:09 +00:00
|
|
|
*
|
2018-02-09 15:23:33 +00:00
|
|
|
* @name Phaser.Physics.Impact.COLLIDES.PASSIVE
|
2019-02-12 15:01:54 +00:00
|
|
|
* @type {integer}
|
|
|
|
* @const
|
2019-02-12 12:22:25 +00:00
|
|
|
* @since 3.0.0
|
2018-02-09 15:23:33 +00:00
|
|
|
*/
|
2017-06-21 23:47:35 +00:00
|
|
|
PASSIVE: 2,
|
2018-02-09 15:23:33 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Active collision.
|
2018-03-18 23:42:09 +00:00
|
|
|
*
|
2018-02-09 15:23:33 +00:00
|
|
|
* @name Phaser.Physics.Impact.COLLIDES.ACTIVE
|
2019-02-12 15:01:54 +00:00
|
|
|
* @type {integer}
|
|
|
|
* @const
|
2019-02-12 12:22:25 +00:00
|
|
|
* @since 3.0.0
|
2018-02-09 15:23:33 +00:00
|
|
|
*/
|
2017-06-21 23:47:35 +00:00
|
|
|
ACTIVE: 4,
|
2018-02-09 15:23:33 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Fixed collision.
|
2018-03-18 23:42:09 +00:00
|
|
|
*
|
2018-02-09 15:23:33 +00:00
|
|
|
* @name Phaser.Physics.Impact.COLLIDES.FIXED
|
2019-02-12 15:01:54 +00:00
|
|
|
* @type {integer}
|
|
|
|
* @const
|
2019-02-12 12:22:25 +00:00
|
|
|
* @since 3.0.0
|
2018-02-09 15:23:33 +00:00
|
|
|
*/
|
2017-06-21 23:47:35 +00:00
|
|
|
FIXED: 8
|
|
|
|
|
|
|
|
};
|