box collider

This commit is contained in:
2026-04-13 14:03:59 +02:00
parent 0f776347f4
commit dc55af5323
8 changed files with 67 additions and 5 deletions

View File

@@ -35,6 +35,14 @@ namespace Game::Object {
virtual void destroyed() {}; // Pre-destruction call
void render(Game::Renderer::Renderer* renderer, Game::Renderer::RendererConfig config);
// Collision calls
// Called once when a collision begins
virtual void onCollisionEnter(Entity* other) {}
// Called every update while a collision continues
virtual void onCollisionStay(Entity* other) {}
// Called once when a collision ends
virtual void onCollisionExit(Entity* other) {}
// Setters and getters
void setTexture(std::shared_ptr<Game::Renderer::Texture> tex) { mTex = tex; }
void setName(const std::string& name) { mName = name; }