mirror of
https://github.com/photonstorm/phaser
synced 2024-12-20 10:03:50 +00:00
50 lines
680 B
JavaScript
50 lines
680 B
JavaScript
var Flip = {
|
|
|
|
flipX: false,
|
|
flipY: false,
|
|
|
|
toggleFlipX: function ()
|
|
{
|
|
this.flipX = !this.flipX;
|
|
|
|
return this;
|
|
},
|
|
|
|
toggleFlipY: function (value)
|
|
{
|
|
this.flipY = !this.flipY;
|
|
|
|
return this;
|
|
},
|
|
|
|
setFlipX: function (value)
|
|
{
|
|
this.flipX = value;
|
|
|
|
return this;
|
|
},
|
|
|
|
setFlipY: function (value)
|
|
{
|
|
this.flipX = value;
|
|
|
|
return this;
|
|
},
|
|
|
|
setFlip: function (x, y)
|
|
{
|
|
this.flipX = x;
|
|
this.flipY = y;
|
|
|
|
return this;
|
|
},
|
|
|
|
resetFlip: function ()
|
|
{
|
|
this.flipX = false;
|
|
this.flipY = false;
|
|
}
|
|
|
|
};
|
|
|
|
module.exports = Flip;
|