mirror of
https://github.com/photonstorm/phaser
synced 2024-11-24 05:33:35 +00:00
Added Ignore Gravity component
This commit is contained in:
parent
a69765d962
commit
8afa631a38
4 changed files with 15 additions and 0 deletions
|
@ -15,6 +15,7 @@ var MatterImage = new Class({
|
|||
Components.Collision,
|
||||
Components.Force,
|
||||
Components.Friction,
|
||||
Components.Gravity,
|
||||
Components.Mass,
|
||||
Components.Sensor,
|
||||
Components.Sleep,
|
||||
|
|
|
@ -16,6 +16,7 @@ var MatterSprite = new Class({
|
|||
Components.Collision,
|
||||
Components.Force,
|
||||
Components.Friction,
|
||||
Components.Gravity,
|
||||
Components.Mass,
|
||||
Components.Sensor,
|
||||
Components.Sleep,
|
||||
|
|
12
v3/src/physics/matter-js/components/Gravity.js
Normal file
12
v3/src/physics/matter-js/components/Gravity.js
Normal file
|
@ -0,0 +1,12 @@
|
|||
var Gravity = {
|
||||
|
||||
setIgnoreGravity: function (value)
|
||||
{
|
||||
this.body.ignoreGravity = value;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
module.exports = Gravity;
|
|
@ -6,6 +6,7 @@ module.exports = {
|
|||
Collision: require('./Collision'),
|
||||
Force: require('./Force'),
|
||||
Friction: require('./Friction'),
|
||||
Gravity: require('./Gravity'),
|
||||
Mass: require('./Mass'),
|
||||
Static: require('./Static'),
|
||||
Sensor: require('./Sensor'),
|
||||
|
|
Loading…
Reference in a new issue