Function

createScopeHandlers

: (app: App) => {

onKeyDown

: ( (action: (key: Key) => void) => KEventController) & ( (key: Key | Key[], action: (key: Key) => void) => KEventController)

onKeyPress

: ( (action: (key: Key) => void) => KEventController) & ( (key: Key | Key[], action: (key: Key) => void) => KEventController)

onKeyPressRepeat

: ( (action: (key: Key) => void) => KEventController) & ( (key: Key | Key[], action: (key: Key) => void) => KEventController)

onKeyRelease

: ( (action: (key: Key) => void) => KEventController) & ( (key: Key | Key[], action: (key: Key) => void) => KEventController)

onCharInput

: (action: (ch: string) => void) => KEventController

onMouseDown

: ( (action: (m: MouseButton) => void) => KEventController) & ( (mouse: MouseButton | MouseButton[], action: (m: MouseButton) => void) => KEventController)

onMousePress

: ( (action: (m: MouseButton) => void) => KEventController) & ( (mouse: MouseButton | MouseButton[], action: (m: MouseButton) => void) => KEventController)

onMouseRelease

: ( (action: (m: MouseButton) => void) => KEventController) & ( (mouse: MouseButton | MouseButton[], action: (m: MouseButton) => void) => KEventController)

onMouseMove

: (f: (pos: Vec2, dpos: Vec2) => void) => KEventController

onTouchStart

: (f: (pos: Vec2, t: Touch) => void) => KEventController

onTouchEnd

: (f: (pos: Vec2, t: Touch) => void) => KEventController

onTouchMove

: (f: (pos: Vec2, t: Touch) => void) => KEventController

onScroll

: (action: (delta: Vec2) => void) => KEventController

onGamepadConnect

: (action: (gamepad: KGamepad) => void) => KEventController

onGamepadDisconnect

: (action: (gamepad: KGamepad) => void) => KEventController

onGamepadButtonDown

: ( (action: (btn: KGamepadButton, gamepad: KGamepad) => void) => KEventController) & ( (btn: KGamepadButton, action: (btn: KGamepadButton, gamepad: KGamepad) => void) => KEventController)

onGamepadButtonPress

: ( (action: (btn: KGamepadButton, gamepad: KGamepad) => void) => KEventController) & ( (btn: KGamepadButton | KGamepadButton[], action: (btn: KGamepadButton, gamepad: KGamepad) => void) => KEventController)

onGamepadButtonRelease

: ( (action: (btn: KGamepadButton, gamepad: KGamepad) => void) => KEventController) & ( (btn: KGamepadButton | KGamepadButton[], action: (btn: KGamepadButton, gamepad: KGamepad) => void) => KEventController)

onGamepadStick

: (stick: KGamepadStick, action: (value: Vec2, gp: KGamepad) => void) => KEventController

onButtonDown

: ( (action: (btn: string) => void) => KEventController) & ( (btn: string | string, action: (btn: string) => void) => KEventController)

onButtonPress

: ( (action: (btn: string) => void) => KEventController) & ( (btn: string | string, action: (btn: string) => void) => KEventController)

onButtonRelease

: ( (action: (btn: string) => void) => KEventController) & ( (btn: string | string, action: (btn: string) => void) => KEventController)

onTabShow

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

onTabHide

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

onUpdate

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

onFixedUpdate

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

onDraw

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

onAdd

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

onDestroy

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

onUse

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

onUnuse

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

onTag

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

onUntag

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

on

: (event: Ev, tag: Tag, cb: (obj: GameObj, args: TupleWithoutFirst<GameObjEvents[Ev]>) => void) => KEventController

onClick

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

onCollide

: typeof onCollide

onCollideEnd

: typeof onCollideEnd

onCollideUpdate

: typeof onCollideUpdate

onHover

: typeof onHover

onHoverEnd

: typeof onHoverEnd

onHoverUpdate

: typeof onHoverUpdate

onResize

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

onSceneLeave

: typeof onSceneLeave

onLoad

: typeof onLoad

onLoading

: typeof onLoading

onError

: typeof onError

onLoadError

: typeof onLoadError

onCleanup

: (action: () => void) => void

onShow

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

onHide

: (action: () => void) => KEventController
}
kaplay logo

Components

Miscellaneous