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
|
|
@ -100,13 +100,13 @@ namespace scene {
|
|||
void Engine::play_animations() {
|
||||
for(auto& fixture : $fixtures) {
|
||||
if(fixture.anim.playing) {
|
||||
animation::apply(fixture.anim, *fixture.st.sprite, fixture.pos);
|
||||
fixture.anim.apply(*fixture.st.sprite, fixture.pos);
|
||||
}
|
||||
}
|
||||
|
||||
for(auto& actor : $actors) {
|
||||
if(actor.anim.playing) {
|
||||
animation::apply(actor.anim, *actor.st.sprite, actor.pos);
|
||||
actor.anim.apply(*actor.st.sprite, actor.pos);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue