aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api/ParticleEmitter.cpp
blob: 4f54bbd0f8ff56e43a2249db09dd8422b2207cf9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include "ParticleEmitter.h"
#include "api/Sprite.h"

using namespace crepe;

ParticleEmitter::ParticleEmitter(game_object_id_t game_object_id, const Sprite & sprite,
								 const Data & data)
	: Component(game_object_id),
	  sprite(sprite),
	  data(data) {
	for (size_t i = 0; i < this->data.max_particles; i++) {
		this->particles.emplace_back();
	}
}