mind
What a cat wants and what it does about it: one tick per cat per frame, reading `Core.dot`, the floor under it and whatever the bus has said.
game.cats.mind
What a cat wants and what it does about it: one tick per cat per frame,
reading Core.dot, the floor under it and whatever the bus has said.
local Mind = require("game.cats.mind")
local cat = Mind.create(breed, rig, startPosition)
local events = Mind.tick(cat, dt, ctx) -- ctx: dotActive, dot, playing, colliders, liftDockedFloor
Body.pose(rig, Mind.pose(cat, now))
It knows three things about the tower. A cat will not walk into the lift
shaft on floors 2 and 3 unless the platform is standing at its floor. A dot
on a ledge is worth a hop only up to that cat's own C.CAT_JUMP_HEIGHT, and
a dot beyond it is not even seen. And a cat inside the shaft when the lift
starts rides it, while one standing beside it is left behind.
tick returns the moments the caller turns into sound and events: arrived,
stepped, landed, spoke, purr, moodChanged.
Scoped to this part · feeds back into the world's score.