Jester stomp sounds, not step !

This commit is contained in:
2026-11-22 11:08:36 -03:00
parent 8add5f852e
commit dfb110e0f8
11 changed files with 50 additions and 12 deletions
+8
View File
@@ -74,6 +74,14 @@ export class EntityAnimation {
return posed ? offsets : undefined;
}
// the sound its next step makes, what the animator says when it has a step_sound, own otherwise
step_sound(own: string | undefined): string | undefined {
const animator = this.#animator;
if (!animator?.step_sound) return own;
let sound: string | undefined;
return this.#run("step_sound", () => sound = animator.step_sound!()) ? sound : own;
}
#on_data(field: string) {
const animator = this.#animator;
if (animator?.on_data) this.#run("on_data", () => animator.on_data!(field, this.#source.age));