aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/Component.cpp
blob: ae76e652b7b869dc9749bb4450a1f0ce515a108c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include "Component.h"

using namespace crepe;
using namespace std;

Component::Component(game_object_id_t id) : game_object_id(id) {}

Component & Component::operator=(const Component & other) {
	this->active = other.active;
	return *this;
}

unique_ptr<Component> Component::save() const {
	return unique_ptr<Component>(new Component(*this));
}

void Component::restore(const Component & snapshot) { *this = snapshot; }