aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api/Rigidbody.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/crepe/api/Rigidbody.h')
-rw-r--r--src/crepe/api/Rigidbody.h18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/crepe/api/Rigidbody.h b/src/crepe/api/Rigidbody.h
index 6cae579..548650a 100644
--- a/src/crepe/api/Rigidbody.h
+++ b/src/crepe/api/Rigidbody.h
@@ -1,16 +1,24 @@
#pragma once
-#include "../Component.h"
+#include "Component.h"
+#include <cstdint>
-namespace crepe::api {
+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);
+ int32_t velocity_x;
+ int32_t velocity_y;
int mass;
int gravity_scale;
- int body_type;
+ BodyType body_type;
};
} // namespace crepe::api