add hit "animation"

This commit is contained in:
2023-01-02 16:37:18 +01:00
parent 1200a6e087
commit fcda12e321
7 changed files with 109 additions and 83 deletions

View File

@@ -87,6 +87,7 @@ void WorldRenderer::RenderMobs() const {
Renderer::Model model;
model.vao = m_MobVao.get();
model.positon = { mob->GetCenterX(), mob->GetCenterY() };
model.color = mob->HasTakenDamage() ? Vec3f{ 1, 0.5, 0.5 } : Vec3f{ 1, 1, 1 };
m_Renderer->RenderModel(model);
}
}