blob: 5fc886b6084c5bbf3d94485c3479fc7984d805fe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#include "../util/Log.h"
#include "Transform.h"
using namespace crepe;
using namespace std;
Transform::Transform(game_object_id_t id, const vec2 & point, double rotation, double scale)
: Component(id),
position(point),
rotation(rotation),
scale(scale) {
dbg_trace();
}
unique_ptr<Component> Transform::save() const {
return unique_ptr<Component>{new Transform(*this)};
}
void Transform::restore(const Component & snapshot) {
*this = static_cast<const Transform &>(snapshot);
}
|