Table of Contents

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
ActionBlock[]
blocks

Returns

ISequenceBlock

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

CollisionEventBuilder<CollisionStart>

Created(params ActionBlock[])

Runs once the moment when the object is instantiated.

public ISequenceBlock Created(params ActionBlock[] blocks)

Parameters

Type Name Description
ActionBlock[]
blocks

Returns

ISequenceBlock

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
ActionBlock[]
blocks

Returns

ISequenceBlock

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
ActionBlock[]
blocks

Returns

ISequenceBlock

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
ActionBlock[]
blocks

Returns

ISequenceBlock

FrameUpdate(params ActionBlock[])

Runs every frame while object is enabled.

public ISequenceBlock FrameUpdate(params ActionBlock[] blocks)

Parameters

Type Name Description
ActionBlock[]
blocks

Returns

ISequenceBlock

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
ActionBlock[]
blocks

Returns

ISequenceBlock

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
ActionBlock[]
blocks

Returns

ISequenceBlock

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()

Returns

TriggerEventBuilder<TriggerStart>