aboutsummaryrefslogtreecommitdiff
path: root/src/crepe
diff options
context:
space:
mode:
Diffstat (limited to 'src/crepe')
-rw-r--r--src/crepe/Collider.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/crepe/Collider.h b/src/crepe/Collider.h
index e910ae4..78e48cf 100644
--- a/src/crepe/Collider.h
+++ b/src/crepe/Collider.h
@@ -10,6 +10,15 @@ class Collider : public Component {
public:
Collider(game_object_id_t id, Vector2 offset);
+protected:
+ // Friend class allowing access to copy constructor
+ friend class CollisionSystem;
+
+ // Copy Constructor (Restricted to CollisionSystem)
+ Collider(const Collider &other)
+ : Component(other.game_object_id), offset(other.offset) {}
+
+public:
//! Offset of the collider relative to rigidbody position
Vector2 offset;
};