delta-time: title.cpp
This commit is contained in:
@@ -122,8 +122,8 @@ void AnimatedSprite::animate(float deltaTime) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Convertir speed (frames) a tiempo: speed frames = speed/60 segundos a 60fps
|
||||
float frameTime = static_cast<float>(animations_[current_animation_].speed) / 60.0f;
|
||||
// Convertir speed (frames) a tiempo: speed frames = speed * (1000ms/60fps) milisegundos
|
||||
float frameTime = static_cast<float>(animations_[current_animation_].speed) * (1000.0f / 60.0f);
|
||||
|
||||
// Acumular tiempo transcurrido
|
||||
animations_[current_animation_].time_accumulator += deltaTime;
|
||||
|
||||
Reference in New Issue
Block a user