mirror of
https://github.com/photonstorm/phaser
synced 2024-12-29 22:43:08 +00:00
35 lines
489 B
JavaScript
35 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;
|