Skip to content

Kaplay.Agent

Modules

Comp

Types

agentOptions
type agentOptions = {speed?: float, allowDiagonals?: bool}
Fields
speed option < float >
allowDiagonals option < bool >

Values

addAgentComponent
let addAgent: (
Kaplay.Context.t,
~options: agentOptions=?,
) => Kaplay.Types.comp
Parameters
option < agentOptions >
Return type
setTarget

Part of the agent comp

let setTarget: (T.t, Kaplay.Vec2.t) => unit
Parameters
T.t
Return type
unit