onCollideUpdate(t1: Tag, t2: Tag, action: (a: GameObj, b: GameObj, col?: Collision)=>void): KEventController

Register an event that runs every frame when 2 game objs with certain tags collides (required to have area() component).

paramt1- The tag of the first game obj.

paramt2- The tag of the second game obj.

paramaction- The function to run when the event is triggered.

onCollideUpdate("sun", "earth", () => {
    debug.log("okay this is so hot");
})l

returnsThe event controller.

sincev3000.0

kaplay logo

Misc

Layer