Class BlackHole
Black hole force field that absorbs particles within a threshold distance.
Fields
| Name | Type | Description |
|---|---|---|
active
|
bool | If true, the force field is active. |
address
|
string | Address of this dispatcher. |
enabled
|
bool | If false, disables event processing. |
entity
|
Entity | The entity this component is attached to. |
eventManager
|
EventManager | The event manager used for polling events. |
inputManager
|
InputManager | The input manager for input state queries. |
visible
|
bool | If false, the component is not rendered. |
domain
|
int | Addressing domain of this dispatcher. |
Methods
| Name | Description |
|---|---|
affect
(p)
|
Applies the force field's effect to a particle. |
onControllerAdd
(deviceIndex, deviceType)
|
Called when a controller is added. |
onControllerAxisMotion
(deviceIndex, axis, value)
|
Called when a controller axis is moved. |
onControllerButtonDown
(deviceIndex, button)
|
Called when a controller button is pressed. |
onControllerButtonUp
(deviceIndex, button)
|
Called when a controller button is released. |
onControllerRemove
(deviceIndex)
|
Called when a controller is removed. |
onCustomResize
(x, y, width, height)
|
|
onDropFile
(filename)
|
Called when a file is dropped onto the window. |
onFileChange
(filename)
|
Called when a file change is detected. |
onFocusGain
()
|
Called when the window gains focus. |
onFocusLoss
()
|
Called when the window loses focus. |
onHardwareSpecificEvent
(deviceIndex, code, payload)
|
Called when a hardware specific event is received from a custom InputDevice. |
onJoystickAxisMotion
(deviceIndex, axis, value)
|
Called when a joystick axis is moved. |
onJoystickButtonDown
(deviceIndex, button)
|
Called when a joystick button is pressed. |
onJoystickButtonUp
(deviceIndex, button)
|
Called when a joystick button is released. |
onKeyboardLayoutChange
()
|
Called when the user switches system keyboard layout. |
onKeyDown
(key)
|
Called when a key is pressed. |
onKeyUp
(key)
|
Called when a key is released. |
onLocaleChange
()
|
Called when a user locale preferences have changed. |
onMessage
(domain, sender, message, payload)
|
Called when a message event is received. |
onMouseButtonDown
(button)
|
Called when a mouse button is pressed. |
onMouseButtonUp
(button)
|
Called when a mouse button is released. |
onMouseWheel
(x, y)
|
Called when the mouse wheel is scrolled. |
onPenMotion
(x, y, pressure)
|
Called when a pen (stilus) is moved over a graphics tablet. |
onQuit
()
|
Called when a quit event is received. |
onResize
(width, height)
|
Called when the window is resized. |
onTask
(domain, sender, callback, payload)
|
Called when a task event is received. |
onTextInput
(code)
|
Called when text input is received. |
onTimerEvent
(timerID, userCode)
|
Called when a timer event is received. |
onUserEvent
(code, payload)
|
Called when a user event is received. |
processEvent
(e, enableInputEvents)
|
Processes a single event, dispatching it to the appropriate handler. |
processEvents
(enableInputEvents)
|
Processes all pending events, dispatching them to handler methods. |
render
(state)
|
Override to implement rendering logic. |
update
(t)
|
Override to implement per-frame update logic. |
generateUserEvent
(code, payload)
|
Queues a user event with the given code and payload pointer. |
queueLog
(level, message)
|
Queues a log event. |
queueMessage
(recipient, message, payload, domain)
|
Queues a message event. |
queueTask
(callback, payload, domain)
|
Queues a task event. |