Now have a fancy hand animation when you cast your rituals.
This commit is contained in:
parent
ad3e580495
commit
7af264e147
9 changed files with 43 additions and 8 deletions
|
|
@ -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"];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue