Now have a fancy hand animation when you cast your rituals.

This commit is contained in:
Zed A. Shaw 2025-09-15 02:14:13 -04:00
parent ad3e580495
commit 7af264e147
9 changed files with 43 additions and 8 deletions

View file

@ -81,7 +81,6 @@ namespace animation {
sprite.setPosition(pos);
sprite.setScale(scale);
return anim.playing;
}
@ -105,6 +104,10 @@ namespace animation {
for(auto& [name, data] : animations.json().items()) {
try {
auto anim = components::convert<Animation>(data);
dbc::check(sprites.contains(name),
fmt::format("animation '{}' doesn't have sprite, spelled wrong in config.json?", name));
auto& sprite_config = sprites[name];
anim.frame_width = sprite_config["frame_width"];