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

@@ -41,7 +41,7 @@ private:
void ChangeBlockAtCursor(BlockType blocktype);
bool m_wireframe = false;
bool m_renderer = false;
bool m_isSkybox = true;
int m_renderCount = 0;
int m_badHitCount = 0;
@@ -62,7 +62,7 @@ private:
Shader m_shader01;
Audio m_audio = Audio(AUDIO_PATH "music01.wav");
Player m_player = Player(Vector3f(CHUNK_SIZE_X * WORLD_SIZE_X / 2, CHUNK_SIZE_Y + 1.8f, CHUNK_SIZE_Z * WORLD_SIZE_X / 2));
Player m_player = Player(Vector3f(0, CHUNK_SIZE_Y + 1.8f, 0));
bool m_keyW = false;
bool m_keyA = false;
@@ -79,10 +79,5 @@ private:
bool m_block = false;
};
template <class T>
static bool EqualWithEpsilon(const T& v1, const T& v2, T epsilon = T(0.0001)) { return (fabs(v2 - v1) < epsilon); }
template <class T>
static bool InRangeWithEpsilon(const T& v, const T& vinf, const T& vsup, T epsilon = T(0.0001)) { return (v >= vinf - epsilon && v <= vsup + epsilon); }
#endif // ENGINE_H__