InternalUnique name of the entity (used for lookup and serialization).
OptionalarrayZ-order for draw sorting (higher = drawn later / on top).
Width of the rectangle (centered on x).
Height of the rectangle (centered on y).
Default fill color for the rectangle (used in base draw implementation).
Current position (center point).
X coordinate (center).
Y coordinate (center).
Left edge of the bounding box.
Right edge of the bounding box.
Top edge of the bounding box.
Bottom edge of the bounding box.
Called once per tick with delta time (seconds).
Draws a filled rectangle centered on the entity's position.
Subclasses should override or call super.draw(ctx) if extending.
The 2D rendering context
Registers a listener for the specified event.
Event name
This emitter for chaining
Registers a one-time listener for the specified event.
The listener is automatically removed after the first invocation.
Event name
This emitter for chaining
Removes a listener for the specified event.
Event name
This emitter for chaining
Emits an event, invoking all registered listeners with the provided arguments.
If the event is "error" and no listeners are registered, the first argument (the error)
will be thrown.
Event name
true if any listeners were invoked, false otherwise
Removes all listeners for the specified event, or all listeners if no event is provided.
Event name
Optionalevent: KOptional event name to clear listeners for
This emitter for chaining
Returns the number of listeners registered for the specified event.
Event name
The event to count listeners for
The number of registered listeners
Update entity.
Draw entity.
Serializes the entity to a plain object (for save/load).
Excludes internal properties and respects nonSerializableProperties.
Serializable data
StaticdeserializeChecks for axis-aligned bounding box collision with another rectangular entity.
The other entity to check against
true if the bounding boxes overlap
The concrete LEA entity instance created for each Kayla component/fiber.
Wraps a LEA.RectLeaEntity and delegates
update()anddraw()to the component'suseTick/usePainthooks.Users should almost never interact with this class directly — use KaylaInternalRect or () / (self) instead.