Remove color randomness

This commit is contained in:
2024-01-30 19:39:52 +01:00
parent df581dcb9d
commit ab0fef8ebf
3 changed files with 10 additions and 15 deletions

View File

@@ -49,7 +49,7 @@ bool updateParticle(const Texture2D tex, Particle *particle, f32 dt) {
.a = lerpInt(startC.a, endC.a, alpha)
};
//BeginBlendMode(particle->blend);
BeginBlendMode(particle->blend);
f32 hSize = size * 0.5f;
Vector2 center = particle->pos;
Rectangle src = getTextureRect(particle->tileID);
@@ -62,7 +62,7 @@ bool updateParticle(const Texture2D tex, Particle *particle, f32 dt) {
center.y,
size, size
}, (Vector2) {hSize, hSize}, rot, color);
//EndBlendMode();
EndBlendMode();
particle->pos = Vector2Add(particle->pos, Vector2Scale(vel, dt));
particle->elapsed += dt;
@@ -98,8 +98,8 @@ Particle spawnParticle(const ParticleEmitter *emitter) {
.endSize = randFloatRange(data->minEndSize, data->maxEndSize),
.startRotSpeed = randFloatRange(data->minStartRotSpeed, data->maxStartRotSpeed),
.endRotSpeed = randFloatRange(data->minEndRotSpeed, data->maxEndRotSpeed),
.startColor = randColorRange(data->minStartColor, data->maxStartColor),
.endColor = randColorRange(data->minEndColor, data->maxEndColor),
.startColor = data->startColor,
.endColor = data->endColor,
.blend = data->blend,
.tileID = data->tileID,
.elapsed = 0.0f,