diff options
author | JAROWMR <jarorutjes07@gmail.com> | 2024-12-05 21:10:07 +0100 |
---|---|---|
committer | JAROWMR <jarorutjes07@gmail.com> | 2024-12-05 21:10:07 +0100 |
commit | 9604616001ac273f2c966c3c829638e905def7bf (patch) | |
tree | 7e958c2b658a4dbc9e79068d7309513efa928937 /src/crepe/system/CollisionSystem.h | |
parent | 018a451051669506be447aa925ecb6a9f5aaf418 (diff) | |
parent | 1f4e961d7f9d6887c807cac1a362f2d178b0860b (diff) |
merge with master and keypressed added to game
Diffstat (limited to 'src/crepe/system/CollisionSystem.h')
-rw-r--r-- | src/crepe/system/CollisionSystem.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/crepe/system/CollisionSystem.h b/src/crepe/system/CollisionSystem.h index eb361b8..6995bb5 100644 --- a/src/crepe/system/CollisionSystem.h +++ b/src/crepe/system/CollisionSystem.h @@ -10,6 +10,7 @@ #include "api/Rigidbody.h" #include "api/Transform.h" #include "api/Vector2.h" +#include "api/Event.h" #include "Collider.h" #include "System.h" @@ -228,7 +229,7 @@ private: * \return Returns true if there is at least one common layer, false otherwise. */ - bool have_common_layer(const std::vector<int> & layers1, const std::vector<int> & layers2); + bool have_common_layer(const std::set<int> & layers1, const std::set<int> & layers2); /** * \brief Checks for collision between two colliders. @@ -297,4 +298,14 @@ private: const Rigidbody & rigidbody2) const; }; +/** + * \brief Event triggered during a collision between objects. + */ +class CollisionEvent : public Event { +public: + crepe::CollisionSystem::CollisionInfo info; + CollisionEvent(const crepe::CollisionSystem::CollisionInfo & collisionInfo) + : info(collisionInfo) {} +}; + } // namespace crepe |