mirror of
https://github.com/photonstorm/phaser
synced 2025-01-02 00:08:46 +00:00
34 lines
489 B
JavaScript
34 lines
489 B
JavaScript
// Depth Component
|
|
|
|
var Depth = {
|
|
|
|
// "private" properties
|
|
_depth: 0,
|
|
|
|
depth: {
|
|
|
|
get: function ()
|
|
{
|
|
return this._depth;
|
|
},
|
|
|
|
set: function (value)
|
|
{
|
|
this.scene.sys.sortChildrenFlag = true;
|
|
this._depth = value;
|
|
}
|
|
|
|
},
|
|
|
|
setDepth: function (value)
|
|
{
|
|
if (value === undefined) { value = 0; }
|
|
|
|
this.depth = value;
|
|
|
|
return this;
|
|
}
|
|
|
|
};
|
|
|
|
module.exports = Depth;
|