box collider
This commit is contained in:
@@ -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; }
|
||||
|
||||
Reference in New Issue
Block a user