Modifications dans Player

This commit is contained in:
MarcEricMartel
2021-12-01 21:21:45 -05:00
parent 97ffc34e24
commit b52c7528c8
136 changed files with 86 additions and 28 deletions

View File

@@ -211,7 +211,7 @@ void Engine::Render(float elapsedTime) {
// (donc l'objet ne bouge pas relativement au joueur, ce qui est pratique pour une skybox!).
glDisable(GL_LIGHT0);
//m_skybox.Render(skybox);
if (m_isSkybox) m_skybox.Render(skybox);
glEnable(GL_LIGHT0);
if (m_mouseL)
@@ -317,7 +317,7 @@ void Engine::Render(float elapsedTime) {
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
if (m_player.GetPosition().y < -20.f)
m_player = Player(Vector3f(CHUNK_SIZE_X * WORLD_SIZE_X / 2, CHUNK_SIZE_Y + 1.8f, CHUNK_SIZE_Z * WORLD_SIZE_X / 2)); // Respawn si le bonho- joueur tombe en bas du monde.
m_player = Player(Vector3f(0, CHUNK_SIZE_Y + 1.8f, 0)); // Respawn si le bonho- joueur tombe en bas du monde.
}
void Engine::KeyPressEvent(unsigned char key)
@@ -387,7 +387,7 @@ void Engine::KeyReleaseEvent(unsigned char key)
m_audio.ToggleMusicState();
break;
case 17:
m_renderer = !m_renderer;
m_isSkybox = !m_isSkybox;
break;
case 24: // Y
m_wireframe = !m_wireframe;