phaser/src/physics/impact/COLLIDES.js

74 lines
1.6 KiB
JavaScript
Raw Normal View History

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.
2018-02-12 16:01:20 +00:00
* @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
*
* @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
*/
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
* @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
* @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
* @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
* @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
* @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
};