Skip to content

Kaplay.Sentry

Modules

Comp

Types

sentryOptions
type sentryOptions = {
direction?: Kaplay.Vec2.t,
fieldOfView?: float,
lineOfSight?: bool,
raycastExclude?: array<string>,
checkFrequency?: float,
}
Fields
direction option < Kaplay.Vec2.t >
fieldOfView option < float >
lineOfSight option < bool >
raycastExclude option < array >
checkFrequency option < float >

Values

addSentryComponent
let addSentry: (
Kaplay.Context.t,
array<'t>,
~options: sentryOptions=?,
) => Kaplay.Types.comp
Parameters
array
option < sentryOptions >
Return type
onObjectsSpotted
let onObjectsSpotted: (T.t, array<'t> => unit) => Kaplay.KEventController.t
Parameters
T.t
array
unit