phaser/v3/src/physics/arcade/components/Friction.js

26 lines
357 B
JavaScript

var Friction = {
setFriction: function (x, y)
{
this.body.friction.set(x, y);
return this;
},
setFrictionX: function (x)
{
this.body.friction.x = x;
return this;
},
setFrictionY: function (y)
{
this.body.friction.y = y;
return this;
}
};
module.exports = Friction;