Switched scene update to state event

This commit is contained in:
2023-03-01 09:40:57 -08:00
parent 6aa7d317d1
commit 1061cda666
10 changed files with 438 additions and 473 deletions

View File

@ -22,10 +22,10 @@ void AnimationController::addAnimation(Animation *animation) {
void AnimationController::onStart() {
SceneItemComponent::onStart();
useEventLegacy([&]{
useEvent([&](float_t delta){
auto it = this->animations.begin();
while(it != this->animations.end()) {
(*it)->tick(this->getGame()->timeManager.delta);
(*it)->tick(delta);
++it;
}
}, getScene()->eventSceneUnpausedUpdate);