feat: object id et objects collisions

feat:
+ Ajout d'un id pour chaque objet cree
+ Ajout de collision entre les objets
This commit is contained in:
StratiX0
2024-04-25 10:18:46 +02:00
parent 50d206649b
commit 9dd129b7bc
5 changed files with 37 additions and 6 deletions

View File

@@ -64,8 +64,8 @@ public:
int GetScreenWidth() const;
int GetScreenHeight() const;
float GetSpeed() const { return speed; };
void SetSpeed(float speed) { this->speed = speed; };
float GetSpeed() const { return m_speed; };
void SetSpeed(float speed) { this->m_speed = speed; };
void AddCube();
void DeleteKobject(int index);
@@ -116,8 +116,9 @@ private :
Object* m_SelectedObject;
std::vector<Object*> m_cubes;
std::vector<Object*> m_terrainChunk;
float speed = 0.1f; // speed for the demo spinning object
float m_speed = 0.1f; // speed for the demo spinning object
std::vector<Object*> m_object;
int m_ObjectId = 0;
// ----------------------------------- //
// ------------- LIGHTS -------------- //