aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api/Rigidbody.h
blob: b7a0064907753601814e5a99c3fc337766a62deb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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