ludic.anim: animset_choice names the playing choice's clip as the set does, animset_can says whether the rig carries any of a state's clips (a one-shot with none is not asked for)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
a22b8a572b
commit
a87f20c66e
6 changed files with 35 additions and 3 deletions
|
|
@ -113,4 +113,15 @@ program AnimSetTest {
|
|||
}
|
||||
expect(playing(pl) == "rig_idle")
|
||||
}
|
||||
test "the playing choice is named as the set names it; a state the rig has no clip for cannot be asked" (anim_st: mut AnimState, render3d_st: mut Render3dState) {
|
||||
let sk = skin(render3d_st)
|
||||
let pl = rig(anim_st)
|
||||
expect(animset_choice(pl) == "")
|
||||
animset_param(pl, "speed", 1.0)
|
||||
animset_tick(anim_st, pl, sk, 0.016)
|
||||
expect(animset_choice(pl) == "walk")
|
||||
expect(animset_can(pl, "wave"))
|
||||
expect(not animset_can(pl, "bow"))
|
||||
expect(not animset_can(pl, "nope"))
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue