Kaplay.Body
Modules
Comp
Types
bodyOptions
type bodyOptions = {isStatic?: bool}
Fields
isStatic option < bool >
Values
addBodyComponent
Physical body that responds to gravity. Requires "area" and "pos" comp. This also makes the object "solid".
let addBody: ( Kaplay.Context.t, ~options: bodyOptions=?,) => Kaplay.Types.comp
Return type
isGrounded
let isGrounded: T.t => bool
Parameters
T.t
Return type
bool
jump
let jump: (T.t, float) => unit
Parameters
T.t
float
Return type
unit
onGround
let onGround: (T.t, unit => unit) => unit
Parameters
T.t
unit
unit
Return type
unit
onGroundWithController
let onGroundWithController: (T.t, unit => unit) => Kaplay.KEventController.t
Parameters
T.t
unit
unit