rétrécissement du monde
This commit is contained in:
@@ -883,7 +883,11 @@ void Engine::DrawHud(float elapsedTime, BlockType bloc) {
|
||||
glPushMatrix();
|
||||
|
||||
int timer = GetCountdown(elapsedTime);
|
||||
|
||||
for (int i = 1; i < WORLD_SIZE_X; i++)
|
||||
{
|
||||
if (timer <= COUNTDOWN - m_timerReductionChunk * i)
|
||||
m_world.RemoveChunk(m_nbReductionChunk * i);
|
||||
}
|
||||
if (m_keyK) {
|
||||
SystemNotification(m_messageNotification);
|
||||
m_keyK = false;
|
||||
@@ -953,6 +957,8 @@ int Engine::GetFps(float elapsedTime) const { return 1 / elapsedTime; }
|
||||
int Engine::GetCountdown(float elapsedTime) {
|
||||
if (m_resetcountdown)
|
||||
{
|
||||
m_nbReductionChunk = 4;
|
||||
m_timerReductionChunk = 30;
|
||||
m_countdown = m_time + COUNTDOWN;
|
||||
m_resetcountdown = false;
|
||||
}
|
||||
@@ -1081,6 +1087,7 @@ void Engine::Render(float elapsedTime) {
|
||||
m_world.Update(m_bullets, m_player.GetPosition(), m_blockinfo);
|
||||
m_renderer.UpdateMesh(&m_world, m_player.GetPosition(), m_blockinfo);
|
||||
|
||||
|
||||
if (m_isSkybox) m_skybox.Render(skybox);
|
||||
|
||||
DrawHud(elapsedTime, bloc);
|
||||
|
Reference in New Issue
Block a user