diff options
Diffstat (limited to 'src/crepe/api/Rigidbody.h')
-rw-r--r-- | src/crepe/api/Rigidbody.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/crepe/api/Rigidbody.h b/src/crepe/api/Rigidbody.h new file mode 100644 index 0000000..b7a0064 --- /dev/null +++ b/src/crepe/api/Rigidbody.h @@ -0,0 +1,24 @@ +#pragma once + +#include "../Component.h" +#include <cstdint> + +namespace crepe::api { + +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(uint32_t gameObjectId,int mass, int gravityScale, BodyType bodyType); + int32_t velocity_x; + int32_t velocity_y; + int mass; + int gravity_scale; + BodyType body_type; +}; + +} // namespace crepe::api |