Added Ignore Gravity component

This commit is contained in:
Richard Davey 2017-11-22 17:11:09 +00:00
parent a69765d962
commit 8afa631a38
4 changed files with 15 additions and 0 deletions

View file

@ -15,6 +15,7 @@ var MatterImage = new Class({
Components.Collision,
Components.Force,
Components.Friction,
Components.Gravity,
Components.Mass,
Components.Sensor,
Components.Sleep,

View file

@ -16,6 +16,7 @@ var MatterSprite = new Class({
Components.Collision,
Components.Force,
Components.Friction,
Components.Gravity,
Components.Mass,
Components.Sensor,
Components.Sleep,

View file

@ -0,0 +1,12 @@
var Gravity = {
setIgnoreGravity: function (value)
{
this.body.ignoreGravity = value;
return this;
}
};
module.exports = Gravity;

View file

@ -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'),