/
VisibilityEnabler2D.hx
71 lines (58 loc) · 2.23 KB
/
VisibilityEnabler2D.hx
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
// Automatically generated Godot externs: DO NOT EDIT
// MIT licensed, see LICENSE.md
package godot;
import cs.system.*;
/**
The VisibilityEnabler2D will disable `godot.RigidBody2D`, `godot.AnimationPlayer`, and other nodes when they are not visible. It will only affect nodes with the same root node as the VisibilityEnabler2D, and the root node itself.
If you just want to receive notifications, use `godot.VisibilityNotifier2D` instead.
Note: For performance reasons, VisibilityEnabler2D uses an approximate heuristic with precision determined by . If you need precise visibility checking, use another method such as adding an `godot.Area2D` node as a child of a `godot.Camera2D` node.
Note: VisibilityEnabler2D will not affect nodes added after scene initialization.
**/
@:libType
@:csNative
@:native("Godot.VisibilityEnabler2D")
@:autoBuild(godot.Godot.buildUserClass())
extern class VisibilityEnabler2D extends godot.VisibilityNotifier2D {
/**
If `true`, the parent's `godot.Node._PhysicsProcess` will be stopped.
**/
@:native("PhysicsProcessParent")
public var physicsProcessParent:Bool;
/**
If `true`, the parent's `godot.Node._Process` will be stopped.
**/
@:native("ProcessParent")
public var processParent:Bool;
/**
If `true`, `godot.AnimatedSprite` nodes will be paused.
**/
@:native("PauseAnimatedSprites")
public var pauseAnimatedSprites:Bool;
/**
If `true`, `godot.Particles2D` nodes will be paused.
**/
@:native("PauseParticles")
public var pauseParticles:Bool;
/**
If `true`, `godot.RigidBody2D` nodes will be paused.
**/
@:native("FreezeBodies")
public var freezeBodies:Bool;
/**
If `true`, `godot.AnimationPlayer` nodes will be paused.
**/
@:native("PauseAnimations")
public var pauseAnimations:Bool;
@:native("new")
public function new():Void;
/**
Sets active state of the enabler identified by given `godot.VisibilityEnabler2D_Enabler` constant.
**/
@:native("SetEnabler")
public function setEnabler(enabler:godot.VisibilityEnabler2D_Enabler, enabled:Bool):Void;
/**
Returns whether the enabler identified by given `godot.VisibilityEnabler2D_Enabler` constant is active.
**/
@:native("IsEnablerEnabled")
public function isEnablerEnabled(enabler:godot.VisibilityEnabler2D_Enabler):Bool;
}