Struct OnObjectEventBuilder
- Namespace
- LunyScript.Api /
- Assembly
- LunyScript.dll
Handles object centered/targeted events, eg state, update, collision events.
public readonly struct OnObjectEventBuilder
Expand Details ...
- Inherited Members
Methods
AfterFrameUpdate(params ActionBlock[])
Runs after frame update while object is enabled.
public ISequenceBlock AfterFrameUpdate(params ActionBlock[] blocks)
Parameters
| Type | Name | Description |
|---|---|---|
blocks |
Returns
Collision()
Starts a filtered 3D collision event builder. Chain filter methods (Tagged, Named, Layered, Masked, Typed, Cooldown) then event handlers (Begins, Updates, Ends) and finalize with Do().
public CollisionEventBuilder<CollisionStart> Collision()
Returns
Created(params ActionBlock[])
Runs once the moment when the object is instantiated.
public ISequenceBlock Created(params ActionBlock[] blocks)
Parameters
| Type | Name | Description |
|---|---|---|
blocks |
Returns
Destroyed(params ActionBlock[])
Runs once when the object gets destroyed. The object is already disabled, the native engine instance still exists.
public ISequenceBlock Destroyed(params ActionBlock[] blocks)
Parameters
| Type | Name | Description |
|---|---|---|
blocks |
Returns
Disabled(params ActionBlock[])
Runs every time the object's state changes to 'disabled' (not visible, not participating). Runs directly before 'Destroyed' if the object was enabled as it got destroyed.
public ISequenceBlock Disabled(params ActionBlock[] blocks)
Parameters
| Type | Name | Description |
|---|---|---|
blocks |
Returns
Enabled(params ActionBlock[])
Runs every time the object's state changes to 'enabled' (visible and participating). Runs directly after 'Created' if the object was just instantiated.
public ISequenceBlock Enabled(params ActionBlock[] blocks)
Parameters
| Type | Name | Description |
|---|---|---|
blocks |
Returns
FrameUpdate(params ActionBlock[])
Runs every frame while object is enabled.
public ISequenceBlock FrameUpdate(params ActionBlock[] blocks)
Parameters
| Type | Name | Description |
|---|---|---|
blocks |
Returns
Heartbeat(params ActionBlock[])
Runs on fixed-rate stepping while object is enabled. Scheduling depends on engine and Time settings, but typically runs 30 or 50 times per second. May run multiple times per frame and may not run in every frame.
public ISequenceBlock Heartbeat(params ActionBlock[] blocks)
Parameters
| Type | Name | Description |
|---|---|---|
blocks |
Returns
Ready(params ActionBlock[])
Runs once per lifetime just before the object starts processing frame/time-step events.
public ISequenceBlock Ready(params ActionBlock[] blocks)
Parameters
| Type | Name | Description |
|---|---|---|
blocks |
Returns
Trigger()
Starts a filtered 3D trigger event builder. Chain filter methods (Tagged, Named, Layered, Masked, Typed, Cooldown) then event handlers (Begins, Updates, Ends) and finalize with Do().
public TriggerEventBuilder<TriggerStart> Trigger()