diff options
author | jaroWMR <jarorutjes07@gmail.com> | 2024-10-20 14:33:19 +0200 |
---|---|---|
committer | jaroWMR <jarorutjes07@gmail.com> | 2024-10-20 14:33:19 +0200 |
commit | d8483cfab70b5aca3baae6e0588924da8b54e090 (patch) | |
tree | 5326d27e365ddea1923ee64586e0c5fc3befe6a9 /src/crepe/Rigidbody.h | |
parent | 4ff1159fe5f6ee6dd8becc662bc95a93acda545a (diff) |
updated components to have an ID
Diffstat (limited to 'src/crepe/Rigidbody.h')
-rw-r--r-- | src/crepe/Rigidbody.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/crepe/Rigidbody.h b/src/crepe/Rigidbody.h index 63a8877..7018e83 100644 --- a/src/crepe/Rigidbody.h +++ b/src/crepe/Rigidbody.h @@ -1,16 +1,23 @@ #pragma once #include "Component.h" +#include <cstdint> namespace crepe { +enum class BodyType { + Static, // Does not move (e.g. walls, ground ...) + Dynamic, // Moves and responds to forces (e.g. player, physics objects ...) + Kinematic // Moves but does not respond to forces (e.g. moving platforms ...) +}; + class Rigidbody : public Component { public: - Rigidbody(int mass, int gravityScale, int bodyType); + Rigidbody(uint32_t gameObjectId,int mass, int gravityScale, BodyType bodyType); int mass; int gravity_scale; - int body_type; + BodyType body_type; }; } // namespace crepe |