Class: ActiveComponent
active is the user-set flag for this entity alone. activeInHierarchy is derived (this && every ancestor) and maintained by ActiveSystem — treat as read-only from game code. Writes to active set dirty, which is ActiveSystem's signal to re-walk the subtree.
underCanvas (also derived by ActiveSystem) is the Cocos rule: 2D content only draws inside a Canvas. True for a Canvas entity and everything below one; nodes where it's false are hidden by NodeTransformSystem whatever they carry.
Extends
Constructors
Constructor
ts
new ActiveComponent(active?): ActiveComponent;Parameters
| Parameter | Type | Default value |
|---|---|---|
active | boolean | true |
Returns
ActiveComponent
Overrides
Properties
| Property | Modifier | Type | Default value | Inherited from |
|---|---|---|---|---|
active | public | boolean | undefined | - |
activeInHierarchy | public | boolean | true | - |
dirty | public | boolean | true | Component.dirty |
enabled | public | boolean | true | Component.enabled |
underCanvas | public | boolean | false | - |