2018-02-12 16:01:20 +00:00
|
|
|
/**
|
|
|
|
* @author Richard Davey <rich@photonstorm.com>
|
|
|
|
* @copyright 2018 Photon Storm Ltd.
|
|
|
|
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
|
|
|
|
*/
|
|
|
|
|
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
|
|
|
*
|
2018-03-21 14:41:34 +00:00
|
|
|
* @name Phaser.Physics.Impact.COLLIDES
|
2018-03-29 15:42:20 +00:00
|
|
|
* @enum {integer}
|
|
|
|
* @memberOf Phaser.Physics.Impact
|
2018-10-09 12:40:00 +00:00
|
|
|
* @readonly
|
2018-03-21 14:41:34 +00:00
|
|
|
* @since 3.0.0
|
2018-02-09 15:23:33 +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
|
|
|
|
*/
|
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
|
|
|
|
*/
|
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
|
|
|
|
*/
|
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
|
|
|
|
*/
|
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
|
|
|
|
*/
|
2017-06-21 23:47:35 +00:00
|
|
|
FIXED: 8
|
|
|
|
|
|
|
|
};
|