Class: Widget#
Hierarchy#
Handle<widget>
↳ Widget
↳↳ Destructable
↳↳ Item
↳↳ Unit
Properties#
handle#
• Readonly handle: widget
Defined in: handles/handle.ts:6
Accessors#
id#
id(): numberGet the unique ID of the handle. The ID is recycled once you destroy the object.
Returns: number
The unique ID of a handle object.
Defined in: handles/handle.ts:18
life#
life(): numberGet the Widget's life.
Returns: number
Defined in: handles/widget.ts:9
life(value: number): voidSet the Widget's life.
Parameters:#
| Name | Type |
|---|---|
value | number |
Returns: void
Defined in: handles/widget.ts:16
x#
x(): numberGet the Widget's x-coordinate
Returns: number
Defined in: handles/widget.ts:23
y#
y(): numberGet the Widget's y-coordinate
Returns: number
Defined in: handles/widget.ts:30
Methods#
fromEvent#
static fromEvent(): WidgetReturns: Widget
Defined in: handles/widget.ts:34
fromHandle#
static fromHandle(handle: widget): WidgetParameters:#
| Name | Type |
|---|---|
handle | widget |
Returns: Widget
Defined in: handles/widget.ts:38