| 1234567891011 |
- # Player animation state machine (D38): states map to sprite defs; the render
- # layer picks the state by the entity's anim field or walk/idle motion inference
- # (an entity whose spriteRef matches this id — "player" — uses this def).
- id: player
- initial: idle
- states:
- - { id: idle, spriteRef: player, loop: true }
- - { id: walk, spriteRef: player-walk, fps: 8, loop: true }
- transitions:
- - { from: idle, to: walk, on: move }
- - { from: walk, to: idle, on: idle }
|