A bit of refactor to put apply in Animation where it belongs.
This commit is contained in:
parent
102c8c36d5
commit
d60e1af6df
10 changed files with 32 additions and 31 deletions
|
|
@ -42,7 +42,7 @@ TEST_CASE("animation utility API", "[animation]") {
|
|||
|
||||
anim.play();
|
||||
|
||||
while(animation::apply(anim, *blanket.sprite, {0,0})) {
|
||||
while(anim.apply(*blanket.sprite, {0,0})) {
|
||||
fmt::println("animation: {}", anim.subframe);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ struct AnimationState {
|
|||
}
|
||||
|
||||
void apply(textures::SpriteTexture& st) {
|
||||
animation::apply(anim, *st.sprite, pos);
|
||||
anim.apply(*st.sprite, pos);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue