Add fly animations

This commit is contained in:
Bram Verhulst
2024-05-29 00:00:29 +02:00
parent 3c83e566dd
commit e1165fdcb4
31 changed files with 580 additions and 157 deletions

View File

@@ -18,7 +18,6 @@ void GuiMeter::Draw() const {
utils::DrawRect(Rectf { m_Position, m_DrawSize});
}
void GuiMeter::Update(float elapsedSec) {
m_Value += 1;
const int frame = static_cast<int>(utils::map(m_Value, 0.0f, m_MaxValue, 0, (float)m_Animation->GetFrameCount()));
m_Animation->SetFrame(frame);
}