-
Notifications
You must be signed in to change notification settings - Fork 0
Area2D
Home | API by Category | Complete API Index | API Compatibility
| Field | Value |
|---|---|
| Full name | Electron2D.Area2D |
| Namespace | Electron2D |
| Kind | class |
| Category | Physics |
Provides an Electron2D 2D area node for overlap and influence queries.
public class Electron2D.Area2D : Electron2D.CollisionObject2DProfile: Electron2D 0.1.0 2D
Status: Partial / Not verified
Out of profile: yes
Godot reference: Area2D
RID lifecycle, monitoring flags, priority, transform sync, AABB overlap snapshots, body_entered/body_exited and area_entered/area_exited signals.
The 0.1.0 Preview baseline creates and frees an area RID, stores area properties and synchronizes transforms. Overlap signals and query results are added by later physics tasks.
This type is not synchronized. Create and mutate nodes on the main scene thread.
This type is available since Electron2D 0.1.0 Preview.
| Member | Kind | Summary |
|---|---|---|
Monitorable |
Property | Gets or sets whether other areas can monitor this area. |
Monitoring |
Property | Gets or sets whether this area monitors overlapping bodies and areas. |
Priority |
Property | Gets or sets the processing priority for this area. |
Electron2D.Area2D() |
Constructor | Creates an area and registers its Electron2D built-in overlap signals. |
GetOverlappingAreas() |
Method | Returns a snapshot of areas currently overlapping this area. |
GetOverlappingBodies() |
Method | Returns a snapshot of physics bodies currently overlapping this area. |
HasOverlappingAreas() |
Method | Checks whether this area currently overlaps at least one other area. |
HasOverlappingBodies() |
Method | Checks whether this area currently overlaps at least one body. |
OverlapsArea(Electron2D.Area2D) |
Method | Checks whether a specific area currently overlaps this area. |
OverlapsBody(Electron2D.Node2D) |
Method | Checks whether a specific body currently overlaps this area. |
Kind: Property
public System.Boolean Monitorable { get; set; }Gets or sets whether other areas can monitor this area.
This property follows the validation and lifetime rules of its declaring type.
The current monitorable value.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.Area2D
Kind: Property
public System.Boolean Monitoring { get; set; }Gets or sets whether this area monitors overlapping bodies and areas.
This property follows the validation and lifetime rules of its declaring type.
The current monitoring value.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.Area2D
Kind: Property
public System.Int32 Priority { get; set; }Gets or sets the processing priority for this area.
This property follows the validation and lifetime rules of its declaring type.
The current priority value.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.Area2D
Kind: Constructor
public Electron2D.Area2D()Creates an area and registers its Electron2D built-in overlap signals.
The new instance follows the lifetime and validation rules of its declaring type.
This constructor is not synchronized. Call it on the main scene thread.
This constructor is available since Electron2D 0.1.0 Preview.
Electron2D.Area2D
Kind: Method
public Electron2D.Area2D[] GetOverlappingAreas()()Returns a snapshot of areas currently overlapping this area.
Areas with Electron2D.Area2D.Monitorable set to false are not
included in another area's snapshot.
A new array containing valid overlapping areas ordered by instance id.
This method is not synchronized. Call it on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Area2D
Kind: Method
public Electron2D.Node2D[] GetOverlappingBodies()()Returns a snapshot of physics bodies currently overlapping this area.
The list updates during Electron2D.SceneTree physics frames. Nodes
that were freed after a deferred deletion are removed before the snapshot
is returned.
A new array containing valid overlapping body nodes ordered by instance id.
This method is not synchronized. Call it on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Area2D
Kind: Method
public System.Boolean HasOverlappingAreas()()Checks whether this area currently overlaps at least one other area.
This method follows the validation and lifetime rules of its declaring type.
true when at least one valid area overlaps this area; otherwise, false.
This method is not synchronized. Call it on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Area2D
Kind: Method
public System.Boolean HasOverlappingBodies()()Checks whether this area currently overlaps at least one body.
This method follows the validation and lifetime rules of its declaring type.
true when at least one valid body overlaps this area; otherwise, false.
This method is not synchronized. Call it on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Area2D
Kind: Method
public System.Boolean OverlapsArea(Electron2D.Area2D)(Electron2D.Area2D area)Checks whether a specific area currently overlaps this area.
This method follows the validation and lifetime rules of its declaring type.
-
area: The area node to check.
true when area is in the current area overlap list.
-
System.ArgumentNullException: Thrown whenareaisnull.
This method is not synchronized. Call it on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Area2D
Kind: Method
public System.Boolean OverlapsBody(Electron2D.Node2D)(Electron2D.Node2D body)Checks whether a specific body currently overlaps this area.
This method follows the validation and lifetime rules of its declaring type.
-
body: The body node to check.
true when body is in the current body overlap list.
-
System.ArgumentNullException: Thrown whenbodyisnull.
This method is not synchronized. Call it on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Area2D
Electron2D 0.1.0 Preview API reference. Generated from 175 public runtime types.