forked from phaserjs/phaser
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVisible.js
More file actions
42 lines (31 loc) · 672 Bytes
/
Copy pathVisible.js
File metadata and controls
42 lines (31 loc) · 672 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// Visible Component
// bitmask flag for GameObject.renderMask
var _FLAG = 1; // 0001
var Visible = {
_visible: true,
visible: {
get: function ()
{
return this._visible;
},
set: function (value)
{
if (value)
{
this._visible = true;
this.renderFlags |= _FLAG;
}
else
{
this._visible = false;
this.renderFlags &= ~_FLAG;
}
}
},
setVisible: function (value)
{
this.visible = value;
return this;
}
};
module.exports = Visible;