mirror of
https://github.com/love2d/love.git
synced 2026-08-14 01:20:56 +02:00
Fix return type of ParticleSystem:getAreaSpreadIsRelativeDirection, remove optional parameters from ParticleSystem:setAreaSpread (resolves #1340)
I opted to remove the optional parameters altogether since they seemed oddly out-of-place. They used to reset the values to defaults when not supplied, and they also weren't returned by getAreaSpread(), so setAreaSpread(getAreaSpread()) actually changed spread parameters. The other option was to remove the separate getters/setters for AreaSpreadIsRelativeDirection and AreaSpreadAngle, and fully rely on setAreaSpread for these parameters, but the rest of the ParticleSystem API tends to keep parameters separate. --HG-- branch : minor
This commit is contained in:
@@ -574,21 +574,6 @@ void ParticleSystem::setAreaSpread(AreaSpreadDistribution distribution, float x,
|
||||
areaSpreadDistribution = distribution;
|
||||
}
|
||||
|
||||
void ParticleSystem::setAreaSpread(AreaSpreadDistribution distribution, float x, float y, float angle)
|
||||
{
|
||||
areaSpread = love::Vector2(x, y);
|
||||
areaSpreadDistribution = distribution;
|
||||
areaSpreadAngle = angle;
|
||||
}
|
||||
|
||||
void ParticleSystem::setAreaSpread(AreaSpreadDistribution distribution, float x, float y, float angle, bool isRelativeDirection)
|
||||
{
|
||||
areaSpread = love::Vector2(x, y);
|
||||
areaSpreadDistribution = distribution;
|
||||
areaSpreadAngle = angle;
|
||||
areaSpreadIsRelativeDirection = isRelativeDirection;
|
||||
}
|
||||
|
||||
ParticleSystem::AreaSpreadDistribution ParticleSystem::getAreaSpreadDistribution() const
|
||||
{
|
||||
return areaSpreadDistribution;
|
||||
@@ -601,7 +586,7 @@ const love::Vector2 &ParticleSystem::getAreaSpreadParameters() const
|
||||
|
||||
void ParticleSystem::setAreaSpreadAngle(float angle)
|
||||
{
|
||||
this->areaSpreadAngle = angle;
|
||||
areaSpreadAngle = angle;
|
||||
}
|
||||
|
||||
float ParticleSystem::getAreaSpreadAngle() const
|
||||
@@ -611,7 +596,7 @@ float ParticleSystem::getAreaSpreadAngle() const
|
||||
|
||||
void ParticleSystem::setAreaSpreadIsRelativeDirection(bool isRelativeDirection)
|
||||
{
|
||||
this->areaSpreadIsRelativeDirection = isRelativeDirection;
|
||||
areaSpreadIsRelativeDirection = isRelativeDirection;
|
||||
}
|
||||
|
||||
bool ParticleSystem::getAreaSpreadIsRelativeDirection() const
|
||||
|
||||
Reference in New Issue
Block a user