Function

onAdd

(tag: Tag, action: (obj: GameObj) => void): KEventController

Register an event that runs when a game obj with certain tag is created.

param tag- The tag to listen for.

param action- The function to run when the event is triggered.

returns The event controller.

since v2000.0

group Events

Function

onAdd

(action: (obj: GameObj) => void): KEventController

Register an event that runs when a game obj is created.

param action- The function to run when the event is triggered.

returns The event controller.

since v2000.0

group Events

kaplay logo

Layer

Miscalenous