blob: c4b1d6f824e1ab98846b2a6e78770370aa22a70c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
  | 
#include "Rigidbody.h"
using namespace crepe;
crepe::Rigidbody::Rigidbody(game_object_id_t id, const Data & data)
	: Component(id),
	  data(data) {}
void crepe::Rigidbody::add_force_linear(const vec2 & force) {
	this->data.linear_velocity += force;
}
void crepe::Rigidbody::add_force_angular(float force) {
	this->data.angular_velocity += force;
}
 
  |