aboutsummaryrefslogtreecommitdiff
path: root/mwe/ecs-homemade/src/Components.cpp
blob: de8753e399544374a847888564a3c8e8d61c6fc6 (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 "Components.h"
#include <iostream>

Component::Component() : mActive(true) {}

Sprite::Sprite(std::string path) : mPath(path) {}

Rigidbody::Rigidbody(int mass, int gravityScale, int bodyType)
	: mMass(mass), mGravityScale(gravityScale), mBodyType(bodyType) {}

Colider::Colider(int size) : mSize(size) {}

void BehaviourScript::onStart() {
	if (behaviour) {
		behaviour->onStart();
	}
}

void BehaviourScript::onUpdate() {
	if (behaviour) {
		behaviour->onUpdate();
	}
}