Cats
MISO, SUMI and YUKI, the three residents of NEKO-9. The scene entrypoint mounts this component on `mount_cats`; it builds the cats at their anchors, registers them on `Core.cats`, and runs one mood tick each per frame.
Cats
MISO, SUMI and YUKI, the three residents of NEKO-9. The scene entrypoint
mounts this component on mount_cats; it builds the cats at their anchors,
registers them on Core.cats, and runs one mood tick each per frame.
Everything it makes is parented to its own entity and rebuilt from the live
world on every awake, so a hot reload never leaves a second set of cats
standing in the lobby.
Moods
| mood | what it is |
|---|---|
idle | wandering its floor, stopping, looking around |
chasing | running at Core.dot.point, which it can see |
sitting | holding where the dot went out, for C.CAT_SIT_SECONDS |
bored | grooming, after C.CAT_BORED_SECONDS of unbroken chasing |
coming | walking to whoever whistled |
riding | standing on the lift while it climbs a floor |
asleep | in the loft bed, and staying there |
What it listens to
whistle, lift.start, lift.stop, floor.reached, cat.asleep,
run.reset — the events the spec assigns to the laser and tower slices.
What it writes
Core.cats[name].mood and .floor every frame, and the cat.mood /
cat.arrived events on the bus.
Fields
volume— a multiplier on every noise a cat makes.liftSeconds— how long one floor of lift travel is expected to take, untillift.stopsays otherwise.
Methods
local cats = entity.find("mount_cats").component.get("Cats")
cats:moods() -- every cat's mood, floor, position and timers
cats:sleep("sumi") -- put one cat in the loft bed
cats:wake("sumi")
cats:call(0, 0.2, 5.5) -- call every cat on that floor to a point
cats:parkDot(2, 0.9, -3, 8) -- a dot at a world point for 8 seconds
cats:restart() -- back to the anchors, awake, nothing on their minds
parkDot is what drives a cat without a pointer in the room: Core.dot is
rewritten by the laser every frame, so a value written into it from outside
survives a single frame and this outlives that.
Scoped to this part · feeds back into the world's score.