push de test pour les animations
This commit is contained in:
@@ -11,12 +11,13 @@ struct Notification {
|
||||
float displayStartTime = 0.0f;
|
||||
};
|
||||
|
||||
|
||||
// Use a queue to manage notifications
|
||||
//std::queue<Notification> notificationQueue;
|
||||
// Use a vector to manage notifications
|
||||
std::vector<Notification> notifications;
|
||||
|
||||
Engine::Engine() {}
|
||||
Engine::Engine() : m_remotePlayer(&m_pinfo), m_pinfo(){}
|
||||
|
||||
Engine::~Engine() {
|
||||
m_world.CleanUpWorld(m_renderCount, true);
|
||||
@@ -275,7 +276,8 @@ void Engine::DrawMenu()
|
||||
ShowCursor();
|
||||
}
|
||||
|
||||
void Engine::Init() {
|
||||
void Engine::Init() {
|
||||
|
||||
|
||||
|
||||
GLenum glewErr = glewInit();
|
||||
@@ -372,6 +374,7 @@ void Engine::Init() {
|
||||
|
||||
m_startTime = std::chrono::high_resolution_clock::now();
|
||||
|
||||
|
||||
// Gestion de souris.
|
||||
CenterMouse();
|
||||
HideCursor();
|
||||
@@ -397,6 +400,7 @@ void Engine::LoadResource() {
|
||||
LoadTexture(MenuQuitTexture, MENU_ITEM_PATH "BasicQuit.png");
|
||||
LoadTexture(MenuOptionsTexture, MENU_ITEM_PATH "test.png");
|
||||
LoadTexture(MenuStartTexture, MENU_ITEM_PATH "BasicPlay.png");
|
||||
|
||||
TextureAtlas::TextureIndex texDirtIndex = m_textureAtlas.AddTexture(TEXTURE_PATH "metal3.png");
|
||||
TextureAtlas::TextureIndex texIceIndex = m_textureAtlas.AddTexture(TEXTURE_PATH "metal2.png");
|
||||
TextureAtlas::TextureIndex texGrassIndex = m_textureAtlas.AddTexture(TEXTURE_PATH "grass.png");
|
||||
@@ -799,6 +803,7 @@ void Engine::DisplaySingleOrMultiplayerMenu() {
|
||||
|
||||
glBindTexture(GL_TEXTURE_2D, 0);
|
||||
|
||||
|
||||
// Single Player and Multiplayer button background quads
|
||||
float buttonWidthProportion = 0.4f;
|
||||
float buttonHeightProportion = 0.075f;
|
||||
@@ -1025,6 +1030,11 @@ void Engine::Render(float elapsedTime) {
|
||||
|
||||
m_player.ApplyTransformation(skybox, false); // Version d'ApplyTransformation qui ne tient compte que de la rotation
|
||||
// (donc l'objet ne bouge pas relativement au joueur, ce qui est pratique pour une skybox!).
|
||||
|
||||
|
||||
|
||||
m_remotePlayer.Render(m_textureAtlas, m_shader01, elapsedTime);
|
||||
//m_remotePlayer.ApplyTransformation(all);
|
||||
|
||||
if (m_mouseWU) bloc++;
|
||||
else if (m_mouseWD) bloc--;
|
||||
@@ -1080,7 +1090,7 @@ void Engine::Render(float elapsedTime) {
|
||||
}
|
||||
}
|
||||
|
||||
m_renderer.RenderWorld(&m_world, m_renderCount, m_player.GetPosition(), m_player.GetDirection(), all, m_shader01, m_textureAtlas);
|
||||
//m_renderer.RenderWorld(&m_world, m_renderCount, m_player.GetPosition(), m_player.GetDirection(), all, m_shader01, m_textureAtlas);
|
||||
m_world.Update(m_bullets, m_player.GetPosition(), m_blockinfo);
|
||||
m_renderer.UpdateMesh(&m_world, m_player.GetPosition(), m_blockinfo);
|
||||
|
||||
|
Reference in New Issue
Block a user