Skip to content

Commit

Permalink
fix: area events return type
Browse files Browse the repository at this point in the history
  • Loading branch information
lajbel committed Jan 20, 2025
1 parent d45d362 commit 78c7a8f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/components/physics/area.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,21 +131,24 @@ export interface AreaComp extends Comp {
*
* @since v2001.0
*/
onCollide(tag: Tag, f: (obj: GameObj, col?: Collision) => void): void;
onCollide(
tag: Tag,
f: (obj: GameObj, col?: Collision) => void,
): KEventController;
/**
* Register an event runs once when collide with another game obj.
*
* @since v2000.1
*/
onCollide(f: (obj: GameObj, col?: Collision) => void): void;
onCollide(f: (obj: GameObj, col?: Collision) => void): KEventController;
/**
* Register an event runs every frame when collide with another game obj with certain tag.
*
* @since v3000.0
*/
onCollideUpdate(
tag: Tag,
f: (obj: GameObj, col?: Collision) => void,
f: (obj: GameObj, col?: Collision) => KEventController,
): KEventController;
/**
* Register an event runs every frame when collide with another game obj.
Expand Down

0 comments on commit 78c7a8f

Please sign in to comment.