2017-03-20 23:37:17 +00:00
|
|
|
var Flip = {
|
|
|
|
|
|
|
|
flipX: false,
|
|
|
|
flipY: false,
|
|
|
|
|
2017-08-11 03:06:37 +00:00
|
|
|
toggleFlipX: function ()
|
|
|
|
{
|
|
|
|
this.flipX = !this.flipX;
|
|
|
|
|
|
|
|
return this;
|
|
|
|
},
|
|
|
|
|
2017-08-31 15:14:58 +00:00
|
|
|
toggleFlipY: function ()
|
2017-08-11 03:06:37 +00:00
|
|
|
{
|
|
|
|
this.flipY = !this.flipY;
|
|
|
|
|
|
|
|
return this;
|
|
|
|
},
|
|
|
|
|
2017-03-27 22:53:22 +00:00
|
|
|
setFlipX: function (value)
|
|
|
|
{
|
|
|
|
this.flipX = value;
|
|
|
|
|
|
|
|
return this;
|
|
|
|
},
|
|
|
|
|
|
|
|
setFlipY: function (value)
|
|
|
|
{
|
2017-08-31 15:14:58 +00:00
|
|
|
this.flipY = value;
|
2017-03-27 22:53:22 +00:00
|
|
|
|
|
|
|
return this;
|
|
|
|
},
|
|
|
|
|
|
|
|
setFlip: function (x, y)
|
|
|
|
{
|
|
|
|
this.flipX = x;
|
|
|
|
this.flipY = y;
|
|
|
|
|
|
|
|
return this;
|
|
|
|
},
|
|
|
|
|
2017-03-20 23:37:17 +00:00
|
|
|
resetFlip: function ()
|
|
|
|
{
|
|
|
|
this.flipX = false;
|
|
|
|
this.flipY = false;
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
2017-03-27 22:53:22 +00:00
|
|
|
module.exports = Flip;
|