mirror of
https://github.com/4ian/GDevelop.git
synced 2025-10-15 10:19:04 +00:00
Fix particle emitter unused parameter friction removing it
This commit is contained in:
@@ -119,30 +119,6 @@ void ExtensionSubDeclaration1(gd::ObjectMetadata& obj) {
|
||||
.AddParameter("object", _("Object"), "ParticleEmitter")
|
||||
.UseStandardRelationalOperatorParameters("number");
|
||||
|
||||
obj.AddAction(
|
||||
"Friction",
|
||||
_("Friction"),
|
||||
_("Modify friction applied to particles."),
|
||||
_("the friction of particles"),
|
||||
_("Common"),
|
||||
"CppPlatform/Extensions/particleSystemicon24.png",
|
||||
"CppPlatform/Extensions/particleSystemicon16.png")
|
||||
.AddParameter("object", _("Object"), "ParticleEmitter")
|
||||
.UseStandardOperatorParameters("number")
|
||||
.GetCodeExtraInformation()
|
||||
.SetGetter("GetFriction");
|
||||
|
||||
obj.AddCondition("Friction",
|
||||
_("Friction"),
|
||||
_("Test friction applied to particles."),
|
||||
_("the friction of particles"),
|
||||
_("Common"),
|
||||
"CppPlatform/Extensions/particleSystemicon24.png",
|
||||
"CppPlatform/Extensions/particleSystemicon16.png")
|
||||
|
||||
.AddParameter("object", _("Object"), "ParticleEmitter")
|
||||
.UseStandardRelationalOperatorParameters("number");
|
||||
|
||||
obj.AddAction("ZoneRadius",
|
||||
_("Creation radius"),
|
||||
_("Modify creation radius of particles.\nParticles have to be "
|
||||
|
@@ -245,12 +245,6 @@ void ExtensionSubDeclaration3(gd::ObjectMetadata& obj) {
|
||||
_("Common"),
|
||||
"CppPlatform/Extensions/particleSystemicon16.png")
|
||||
.AddParameter("object", _("Object"), "ParticleEmitter", false);
|
||||
obj.AddExpression("Friction",
|
||||
_("Particles friction"),
|
||||
_("Particles friction"),
|
||||
_("Common"),
|
||||
"CppPlatform/Extensions/particleSystemicon16.png")
|
||||
.AddParameter("object", _("Object"), "ParticleEmitter", false);
|
||||
obj.AddExpression("ParticleLifeTimeMin",
|
||||
_("Minimum lifetime of particles"),
|
||||
_("Minimum lifetime of particles"),
|
||||
|
@@ -32,7 +32,6 @@ ParticleEmitterBase::ParticleEmitterBase()
|
||||
zoneRadius(3.0f),
|
||||
particleGravityX(0.0f),
|
||||
particleGravityY(0.0f),
|
||||
friction(2.0f),
|
||||
particleLifeTimeMin(0.5f),
|
||||
particleLifeTimeMax(2.5f),
|
||||
particleRed1(255.0f),
|
||||
@@ -75,7 +74,6 @@ void ParticleEmitterBase::UnserializeParticleEmitterBaseFrom(
|
||||
zoneRadius = element.GetDoubleAttribute("zoneRadius");
|
||||
particleGravityX = element.GetDoubleAttribute("particleGravityX");
|
||||
particleGravityY = element.GetDoubleAttribute("particleGravityY");
|
||||
friction = element.GetDoubleAttribute("friction");
|
||||
particleLifeTimeMin = element.GetDoubleAttribute("particleLifeTimeMin");
|
||||
particleLifeTimeMax = element.GetDoubleAttribute("particleLifeTimeMax");
|
||||
particleRed1 = element.GetDoubleAttribute("particleRed1");
|
||||
@@ -137,7 +135,6 @@ void ParticleEmitterBase::SerializeParticleEmitterBaseTo(
|
||||
element.SetAttribute("zoneRadius", zoneRadius);
|
||||
element.SetAttribute("particleGravityX", particleGravityX);
|
||||
element.SetAttribute("particleGravityY", particleGravityY);
|
||||
element.SetAttribute("friction", friction);
|
||||
element.SetAttribute("particleLifeTimeMin", particleLifeTimeMin);
|
||||
element.SetAttribute("particleLifeTimeMax", particleLifeTimeMax);
|
||||
element.SetAttribute("particleRed1", particleRed1);
|
||||
@@ -200,9 +197,6 @@ void ParticleEmitterBase::SetParticleGravityX(float newValue) {
|
||||
void ParticleEmitterBase::SetParticleGravityY(float newValue) {
|
||||
particleGravityY = newValue;
|
||||
}
|
||||
void ParticleEmitterBase::SetFriction(float newValue) {
|
||||
friction = newValue;
|
||||
}
|
||||
void ParticleEmitterBase::SetEmitterAngleA(float newValue) {
|
||||
emitterAngleA = newValue;
|
||||
}
|
||||
@@ -276,7 +270,6 @@ void ParticleEmitterBase::Init(const ParticleEmitterBase& other) {
|
||||
zoneRadius = other.zoneRadius;
|
||||
particleGravityX = other.particleGravityX;
|
||||
particleGravityY = other.particleGravityY;
|
||||
friction = other.friction;
|
||||
particleLifeTimeMin = other.particleLifeTimeMin;
|
||||
particleLifeTimeMax = other.particleLifeTimeMax;
|
||||
particleRed1 = other.particleRed1;
|
||||
|
@@ -49,7 +49,6 @@ class GD_EXTENSION_API ParticleEmitterBase {
|
||||
void SetParticleGravityY(float newValue);
|
||||
void SetParticleGravityAngle(float newAngleInDegree);
|
||||
void SetParticleGravityLength(float newLength);
|
||||
void SetFriction(float newValue);
|
||||
|
||||
void SetParticleColor1(const gd::String& color);
|
||||
void SetParticleColor2(const gd::String& color);
|
||||
@@ -133,7 +132,6 @@ class GD_EXTENSION_API ParticleEmitterBase {
|
||||
float GetParticleGravityY() const { return particleGravityY; };
|
||||
float GetParticleGravityAngle() const;
|
||||
float GetParticleGravityLength() const;
|
||||
float GetFriction() const { return friction; };
|
||||
float GetParticleLifeTimeMin() const { return particleLifeTimeMin; };
|
||||
float GetParticleLifeTimeMax() const { return particleLifeTimeMax; };
|
||||
std::size_t GetMaxParticleNb() const { return maxParticleNb; };
|
||||
@@ -197,7 +195,6 @@ class GD_EXTENSION_API ParticleEmitterBase {
|
||||
float emitterAngleB;
|
||||
float zoneRadius;
|
||||
float particleGravityX, particleGravityY;
|
||||
float friction;
|
||||
float particleLifeTimeMin, particleLifeTimeMax;
|
||||
float particleRed1, particleRed2, particleGreen1, particleGreen2,
|
||||
particleBlue1, particleBlue2, particleAlpha1, particleAlpha2;
|
||||
|
@@ -2634,8 +2634,6 @@ interface ParticleEmitterObject {
|
||||
float GetParticleGravityAngle();
|
||||
void SetParticleGravityLength(float newValue);
|
||||
float GetParticleGravityLength();
|
||||
void SetFriction(float newValue);
|
||||
float GetFriction();
|
||||
|
||||
void SetParticleLifeTimeMin(float newValue);
|
||||
float GetParticleLifeTimeMin();
|
||||
|
@@ -36,8 +36,6 @@ declare class gdParticleEmitterObject extends gdObject {
|
||||
getParticleGravityAngle(): number;
|
||||
setParticleGravityLength(newValue: number): void;
|
||||
getParticleGravityLength(): number;
|
||||
setFriction(newValue: number): void;
|
||||
getFriction(): number;
|
||||
setParticleLifeTimeMin(newValue: number): void;
|
||||
getParticleLifeTimeMin(): number;
|
||||
setParticleLifeTimeMax(newValue: number): void;
|
||||
|
@@ -1837,7 +1837,6 @@
|
||||
"emitterForceMax": 85,
|
||||
"emitterForceMin": 45,
|
||||
"flow": 45,
|
||||
"friction": 2,
|
||||
"maxParticleNb": 10,
|
||||
"name": "Shape4Explosion",
|
||||
"particleAlpha1": 255,
|
||||
@@ -1881,7 +1880,6 @@
|
||||
"emitterForceMax": 85,
|
||||
"emitterForceMin": 45,
|
||||
"flow": 45,
|
||||
"friction": 2,
|
||||
"maxParticleNb": 10,
|
||||
"name": "Shape3Explosion",
|
||||
"particleAlpha1": 255,
|
||||
@@ -1925,7 +1923,6 @@
|
||||
"emitterForceMax": 85,
|
||||
"emitterForceMin": 45,
|
||||
"flow": 45,
|
||||
"friction": 2,
|
||||
"maxParticleNb": 10,
|
||||
"name": "Shape2Explosion",
|
||||
"particleAlpha1": 255,
|
||||
@@ -1969,7 +1966,6 @@
|
||||
"emitterForceMax": 85,
|
||||
"emitterForceMin": 45,
|
||||
"flow": 45,
|
||||
"friction": 2,
|
||||
"maxParticleNb": 10,
|
||||
"name": "Shape1Explosion",
|
||||
"particleAlpha1": 255,
|
||||
|
@@ -1878,7 +1878,6 @@
|
||||
"emitterForceMax": 85,
|
||||
"emitterForceMin": 45,
|
||||
"flow": 45,
|
||||
"friction": 2,
|
||||
"maxParticleNb": 25,
|
||||
"name": "star_particle",
|
||||
"particleAlpha1": 255,
|
||||
|
@@ -1792,7 +1792,6 @@
|
||||
"emitterForceMax": 0,
|
||||
"emitterForceMin": 0,
|
||||
"flow": 2,
|
||||
"friction": 400,
|
||||
"maxParticleNb": 300,
|
||||
"name": "BadEnergy",
|
||||
"particleAlpha1": 0,
|
||||
@@ -1836,7 +1835,6 @@
|
||||
"emitterForceMax": 20,
|
||||
"emitterForceMin": 10,
|
||||
"flow": 2,
|
||||
"friction": 400,
|
||||
"maxParticleNb": 300,
|
||||
"name": "HorrorBloodyHand",
|
||||
"particleAlpha1": 0,
|
||||
@@ -1880,7 +1878,6 @@
|
||||
"emitterForceMax": 20,
|
||||
"emitterForceMin": 10,
|
||||
"flow": 4,
|
||||
"friction": 400,
|
||||
"maxParticleNb": 300,
|
||||
"name": "VoidEnergy",
|
||||
"particleAlpha1": 255,
|
||||
@@ -1924,7 +1921,6 @@
|
||||
"emitterForceMax": 20,
|
||||
"emitterForceMin": 10,
|
||||
"flow": 4,
|
||||
"friction": 400,
|
||||
"maxParticleNb": 300,
|
||||
"name": "DarkMagicEnergy",
|
||||
"particleAlpha1": 0,
|
||||
@@ -1968,7 +1964,6 @@
|
||||
"emitterForceMax": 90,
|
||||
"emitterForceMin": 50,
|
||||
"flow": 60,
|
||||
"friction": 400,
|
||||
"maxParticleNb": 300,
|
||||
"name": "StarSparks",
|
||||
"particleAlpha1": 204,
|
||||
@@ -2012,7 +2007,6 @@
|
||||
"emitterForceMax": 45,
|
||||
"emitterForceMin": 35,
|
||||
"flow": 2,
|
||||
"friction": 400,
|
||||
"maxParticleNb": 300,
|
||||
"name": "BasicSnowFlakes",
|
||||
"particleAlpha1": 0,
|
||||
@@ -2056,7 +2050,6 @@
|
||||
"emitterForceMax": 45,
|
||||
"emitterForceMin": 35,
|
||||
"flow": 10,
|
||||
"friction": 400,
|
||||
"maxParticleNb": 300,
|
||||
"name": "BasicSnow2",
|
||||
"particleAlpha1": 0,
|
||||
@@ -2100,7 +2093,6 @@
|
||||
"emitterForceMax": 6000,
|
||||
"emitterForceMin": 3000,
|
||||
"flow": 600,
|
||||
"friction": 400,
|
||||
"maxParticleNb": 1000,
|
||||
"name": "Hyperspace2",
|
||||
"particleAlpha1": 255,
|
||||
@@ -2144,7 +2136,6 @@
|
||||
"emitterForceMax": 4000,
|
||||
"emitterForceMin": 1000,
|
||||
"flow": 300,
|
||||
"friction": 400,
|
||||
"maxParticleNb": 1000,
|
||||
"name": "Hyperspace",
|
||||
"particleAlpha1": 255,
|
||||
@@ -2188,7 +2179,6 @@
|
||||
"emitterForceMax": 300,
|
||||
"emitterForceMin": 300,
|
||||
"flow": 200,
|
||||
"friction": 400,
|
||||
"maxParticleNb": 1000,
|
||||
"name": "BasicRain",
|
||||
"particleAlpha1": 0,
|
||||
@@ -2232,7 +2222,6 @@
|
||||
"emitterForceMax": 35,
|
||||
"emitterForceMin": 25,
|
||||
"flow": 20,
|
||||
"friction": 400,
|
||||
"maxParticleNb": 300,
|
||||
"name": "BasicSnow",
|
||||
"particleAlpha1": 0,
|
||||
@@ -2276,7 +2265,6 @@
|
||||
"emitterForceMax": 120,
|
||||
"emitterForceMin": 20,
|
||||
"flow": 100,
|
||||
"friction": 400,
|
||||
"maxParticleNb": 300,
|
||||
"name": "BasicLiquidDrops",
|
||||
"particleAlpha1": 204,
|
||||
@@ -2320,7 +2308,6 @@
|
||||
"emitterForceMax": 200,
|
||||
"emitterForceMin": 50,
|
||||
"flow": 200,
|
||||
"friction": 400,
|
||||
"maxParticleNb": 300,
|
||||
"name": "BasicLiquid",
|
||||
"particleAlpha1": 150,
|
||||
@@ -2364,7 +2351,6 @@
|
||||
"emitterForceMax": 300,
|
||||
"emitterForceMin": 130,
|
||||
"flow": 80,
|
||||
"friction": 400,
|
||||
"maxParticleNb": 300,
|
||||
"name": "BlueSparks",
|
||||
"particleAlpha1": 204,
|
||||
@@ -2408,7 +2394,6 @@
|
||||
"emitterForceMax": 300,
|
||||
"emitterForceMin": 100,
|
||||
"flow": 60,
|
||||
"friction": 400,
|
||||
"maxParticleNb": 300,
|
||||
"name": "Sparks",
|
||||
"particleAlpha1": 204,
|
||||
@@ -2452,7 +2437,6 @@
|
||||
"emitterForceMax": 300,
|
||||
"emitterForceMin": 100,
|
||||
"flow": 60,
|
||||
"friction": 400,
|
||||
"maxParticleNb": 300,
|
||||
"name": "BasicSparks",
|
||||
"particleAlpha1": 204,
|
||||
@@ -2496,7 +2480,6 @@
|
||||
"emitterForceMax": 30,
|
||||
"emitterForceMin": 20,
|
||||
"flow": 15,
|
||||
"friction": 100,
|
||||
"maxParticleNb": 300,
|
||||
"name": "DarkMagicFog",
|
||||
"particleAlpha1": 204,
|
||||
@@ -2540,7 +2523,6 @@
|
||||
"emitterForceMax": 30,
|
||||
"emitterForceMin": 20,
|
||||
"flow": 15,
|
||||
"friction": 100,
|
||||
"maxParticleNb": 300,
|
||||
"name": "DarkMagicSmoke2",
|
||||
"particleAlpha1": 204,
|
||||
@@ -2584,7 +2566,6 @@
|
||||
"emitterForceMax": 30,
|
||||
"emitterForceMin": 20,
|
||||
"flow": 15,
|
||||
"friction": 100,
|
||||
"maxParticleNb": 300,
|
||||
"name": "DarkMagicSmoke",
|
||||
"particleAlpha1": 204,
|
||||
@@ -2628,7 +2609,6 @@
|
||||
"emitterForceMax": 250,
|
||||
"emitterForceMin": 150,
|
||||
"flow": 15,
|
||||
"friction": 100,
|
||||
"maxParticleNb": 300,
|
||||
"name": "PixelSmoke",
|
||||
"particleAlpha1": 204,
|
||||
@@ -2672,7 +2652,6 @@
|
||||
"emitterForceMax": 250,
|
||||
"emitterForceMin": 150,
|
||||
"flow": 15,
|
||||
"friction": 100,
|
||||
"maxParticleNb": 300,
|
||||
"name": "BasicSmoke",
|
||||
"particleAlpha1": 150,
|
||||
@@ -2716,7 +2695,6 @@
|
||||
"emitterForceMax": 20,
|
||||
"emitterForceMin": 10,
|
||||
"flow": 100,
|
||||
"friction": 100,
|
||||
"maxParticleNb": 300,
|
||||
"name": "LightningTexture",
|
||||
"particleAlpha1": 204,
|
||||
@@ -2760,7 +2738,6 @@
|
||||
"emitterForceMax": 20,
|
||||
"emitterForceMin": 10,
|
||||
"flow": 100,
|
||||
"friction": 100,
|
||||
"maxParticleNb": 300,
|
||||
"name": "BasicExplosionFlame",
|
||||
"particleAlpha1": 204,
|
||||
@@ -2804,7 +2781,6 @@
|
||||
"emitterForceMax": 4,
|
||||
"emitterForceMin": 1,
|
||||
"flow": 1,
|
||||
"friction": 100,
|
||||
"maxParticleNb": 300,
|
||||
"name": "BloodImpact2",
|
||||
"particleAlpha1": 255,
|
||||
@@ -2848,7 +2824,6 @@
|
||||
"emitterForceMax": 4,
|
||||
"emitterForceMin": 1,
|
||||
"flow": 1,
|
||||
"friction": 100,
|
||||
"maxParticleNb": 300,
|
||||
"name": "BloodImpact",
|
||||
"particleAlpha1": 255,
|
||||
@@ -2892,7 +2867,6 @@
|
||||
"emitterForceMax": 100,
|
||||
"emitterForceMin": 80,
|
||||
"flow": 100,
|
||||
"friction": 100,
|
||||
"maxParticleNb": 300,
|
||||
"name": "BasicExplosionSmooth",
|
||||
"particleAlpha1": 204,
|
||||
@@ -2936,7 +2910,6 @@
|
||||
"emitterForceMax": 220,
|
||||
"emitterForceMin": 120,
|
||||
"flow": 100,
|
||||
"friction": 100,
|
||||
"maxParticleNb": 300,
|
||||
"name": "BasicExplosionEnergySparks",
|
||||
"particleAlpha1": 204,
|
||||
@@ -2980,7 +2953,6 @@
|
||||
"emitterForceMax": 0,
|
||||
"emitterForceMin": 0,
|
||||
"flow": 1,
|
||||
"friction": 100,
|
||||
"maxParticleNb": 12,
|
||||
"name": "BloodDrops",
|
||||
"particleAlpha1": 120,
|
||||
@@ -3024,7 +2996,6 @@
|
||||
"emitterForceMax": 170,
|
||||
"emitterForceMin": 80,
|
||||
"flow": 100,
|
||||
"friction": 100,
|
||||
"maxParticleNb": 300,
|
||||
"name": "BasicExplosionSharp",
|
||||
"particleAlpha1": 204,
|
||||
@@ -3068,7 +3039,6 @@
|
||||
"emitterForceMax": 90,
|
||||
"emitterForceMin": 50,
|
||||
"flow": 100,
|
||||
"friction": 100,
|
||||
"maxParticleNb": 300,
|
||||
"name": "BasicExplosionEnergy",
|
||||
"particleAlpha1": 204,
|
||||
@@ -3112,7 +3082,6 @@
|
||||
"emitterForceMax": 90,
|
||||
"emitterForceMin": 50,
|
||||
"flow": 100,
|
||||
"friction": 100,
|
||||
"maxParticleNb": 300,
|
||||
"name": "BasicExplosion",
|
||||
"particleAlpha1": 204,
|
||||
@@ -3156,7 +3125,6 @@
|
||||
"emitterForceMax": 40,
|
||||
"emitterForceMin": 30,
|
||||
"flow": 100,
|
||||
"friction": 100,
|
||||
"maxParticleNb": 300,
|
||||
"name": "DarkMagic",
|
||||
"particleAlpha1": 204,
|
||||
@@ -3200,7 +3168,6 @@
|
||||
"emitterForceMax": 40,
|
||||
"emitterForceMin": 30,
|
||||
"flow": 100,
|
||||
"friction": 100,
|
||||
"maxParticleNb": 300,
|
||||
"name": "Magic4",
|
||||
"particleAlpha1": 204,
|
||||
@@ -3244,7 +3211,6 @@
|
||||
"emitterForceMax": 40,
|
||||
"emitterForceMin": 30,
|
||||
"flow": 100,
|
||||
"friction": 100,
|
||||
"maxParticleNb": 300,
|
||||
"name": "Magic3",
|
||||
"particleAlpha1": 204,
|
||||
@@ -3288,7 +3254,6 @@
|
||||
"emitterForceMax": 8,
|
||||
"emitterForceMin": 5,
|
||||
"flow": 2,
|
||||
"friction": 100,
|
||||
"maxParticleNb": 300,
|
||||
"name": "Magic2",
|
||||
"particleAlpha1": 204,
|
||||
@@ -3332,7 +3297,6 @@
|
||||
"emitterForceMax": 10,
|
||||
"emitterForceMin": 5,
|
||||
"flow": 100,
|
||||
"friction": 100,
|
||||
"maxParticleNb": 300,
|
||||
"name": "Magic",
|
||||
"particleAlpha1": 204,
|
||||
@@ -3376,7 +3340,6 @@
|
||||
"emitterForceMax": 300,
|
||||
"emitterForceMin": 200,
|
||||
"flow": 100,
|
||||
"friction": 100,
|
||||
"maxParticleNb": 300,
|
||||
"name": "SmoothFlame",
|
||||
"particleAlpha1": 204,
|
||||
@@ -3420,7 +3383,6 @@
|
||||
"emitterForceMax": 300,
|
||||
"emitterForceMin": 200,
|
||||
"flow": 200,
|
||||
"friction": 100,
|
||||
"maxParticleNb": 300,
|
||||
"name": "PixelFlame",
|
||||
"particleAlpha1": 204,
|
||||
@@ -3464,7 +3426,6 @@
|
||||
"emitterForceMax": 0,
|
||||
"emitterForceMin": 0,
|
||||
"flow": 1000,
|
||||
"friction": 100,
|
||||
"maxParticleNb": 10000,
|
||||
"name": "SparksPoint2",
|
||||
"particleAlpha1": 255,
|
||||
@@ -3508,7 +3469,6 @@
|
||||
"emitterForceMax": 90,
|
||||
"emitterForceMin": 50,
|
||||
"flow": 100,
|
||||
"friction": 100,
|
||||
"maxParticleNb": 300,
|
||||
"name": "SparksPoint",
|
||||
"particleAlpha1": 204,
|
||||
@@ -3552,7 +3512,6 @@
|
||||
"emitterForceMax": 300,
|
||||
"emitterForceMin": 200,
|
||||
"flow": 100,
|
||||
"friction": 100,
|
||||
"maxParticleNb": 300,
|
||||
"name": "BasicFlame",
|
||||
"particleAlpha1": 204,
|
||||
@@ -3596,7 +3555,6 @@
|
||||
"emitterForceMax": 0,
|
||||
"emitterForceMin": 0,
|
||||
"flow": 1,
|
||||
"friction": 2,
|
||||
"maxParticleNb": 300,
|
||||
"name": "Circle01",
|
||||
"particleAlpha1": 0,
|
||||
@@ -3640,7 +3598,6 @@
|
||||
"emitterForceMax": 0,
|
||||
"emitterForceMin": 0,
|
||||
"flow": 1,
|
||||
"friction": 2,
|
||||
"maxParticleNb": 300,
|
||||
"name": "Circle02",
|
||||
"particleAlpha1": 0,
|
||||
|
@@ -362,17 +362,6 @@ export default class ParticleEmitterEditor extends React.Component<
|
||||
}}
|
||||
/>
|
||||
</ResponsiveLineStackLayout>
|
||||
<SemiControlledTextField
|
||||
commitOnBlur
|
||||
floatingLabelText={<Trans>Friction on particles</Trans>}
|
||||
fullWidth
|
||||
type="number"
|
||||
value={particleEmitterObject.getFriction()}
|
||||
onChange={value => {
|
||||
particleEmitterObject.setFriction(parseFloat(value));
|
||||
this.forceUpdate();
|
||||
}}
|
||||
/>
|
||||
<ResponsiveLineStackLayout noMargin>
|
||||
<SemiControlledTextField
|
||||
commitOnBlur
|
||||
|
Reference in New Issue
Block a user