forked from Mirrors/openclonk
adapted Air particle and usages to new particle system
parent
55fc0f6dd7
commit
81924b1503
|
@ -1,17 +1,3 @@
|
||||||
[Particle]
|
[Particle]
|
||||||
Name=Air
|
Name=Air
|
||||||
MaxCount=1500
|
|
||||||
InitFn=StdInit
|
|
||||||
ExecFn=StdExec
|
|
||||||
CollisionFn=Bounce
|
|
||||||
DrawFn=Std
|
|
||||||
Face=0,0,32,32,-16,-16
|
Face=0,0,32,32,-16,-16
|
||||||
Delay=0
|
|
||||||
Repeats=1
|
|
||||||
GravityAcc=-15
|
|
||||||
VertexCount=1
|
|
||||||
VertexY=50
|
|
||||||
AlphaFade=8
|
|
||||||
Additive=1
|
|
||||||
RByV=1
|
|
||||||
Attach=1
|
|
|
@ -13,12 +13,7 @@ protected func Initialize()
|
||||||
AddEffect("Float",this,1,1,this);
|
AddEffect("Float",this,1,1,this);
|
||||||
|
|
||||||
//Special Effects
|
//Special Effects
|
||||||
var i = 0;
|
CreateParticleEx("Air", PV_Random(-1, 1), PV_Random(15, 17), PV_Random(-3, 3), PV_Random(0, 2), 18, Particles_Air(), 20);
|
||||||
while(i <= 7)
|
|
||||||
{
|
|
||||||
CreateParticle("Air", 0,16,-3 + Random(7),Random(2),RandomX(70,150),RGB(255,255,255), this);
|
|
||||||
++i;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private func Deflate()
|
private func Deflate()
|
||||||
|
@ -33,7 +28,8 @@ private func Deflate()
|
||||||
|
|
||||||
private func DeflateEffect()
|
private func DeflateEffect()
|
||||||
{
|
{
|
||||||
CreateParticle("Air",0,16,0,0,GetActTime()*3,RGB(255,255,255));
|
var act_time = GetActTime();
|
||||||
|
CreateParticleEx("Air", PV_Random(-1, 1), PV_Random(-1, 5), PV_Random(-act_time, act_time), PV_Random(-act_time, act_time), 18, Particles_Air(), act_time);
|
||||||
}
|
}
|
||||||
|
|
||||||
private func Pack()
|
private func Pack()
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 3.0 KiB |
|
@ -1,17 +0,0 @@
|
||||||
[Particle]
|
|
||||||
Name=AirIntake
|
|
||||||
MaxCount=1500
|
|
||||||
InitFn=StdInit
|
|
||||||
ExecFn=StdExec
|
|
||||||
CollisionFn=Die
|
|
||||||
DrawFn=Std
|
|
||||||
Face=0,0,128,128,-64,-64
|
|
||||||
Delay=0
|
|
||||||
Repeats=1
|
|
||||||
GravityAcc=-15
|
|
||||||
VertexCount=1
|
|
||||||
VertexY=50
|
|
||||||
AlphaFade=8
|
|
||||||
Additive=1
|
|
||||||
RByV=1
|
|
||||||
Attach=1
|
|
|
@ -84,13 +84,7 @@ protected func Load()
|
||||||
sound=true;
|
sound=true;
|
||||||
}
|
}
|
||||||
Amount += 2; //Air is sucked in.
|
Amount += 2; //Air is sucked in.
|
||||||
CreateParticle("AirIntake",
|
CreateParticleEx("Air", SX, SY, Sin(A + R,-D / 2), Cos(A + R,-D / 2), 18, {Prototype = Particles_Air(), Size = PV_KeyFrames(0, 0, 0, 250, 3, 1000, 0)});
|
||||||
SX,SY,
|
|
||||||
Sin(A + R,-D / 2),
|
|
||||||
Cos(A + R,-D / 2),
|
|
||||||
RandomX(35,80),
|
|
||||||
RGBa(255,255,255,128)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
else if(GBackSolid(0,0) || GBackLiquid(0,0))
|
else if(GBackSolid(0,0) || GBackLiquid(0,0))
|
||||||
{
|
{
|
||||||
|
@ -130,12 +124,7 @@ private func FireWeapon(object pClonk,iX,iY)
|
||||||
|
|
||||||
if(!GBackSolid(SX,SY))
|
if(!GBackSolid(SX,SY))
|
||||||
{
|
{
|
||||||
CreateParticle("Air",
|
CreateParticleEx("Air", SX, SY, Sin(180 - iAngle + (R),(Amount / 2) + 25), Cos(180 - iAngle + (R),(Amount / 2) + 25), 36, Particles_Air());
|
||||||
SX,SY,
|
|
||||||
Sin(180 - iAngle + (R),(Amount / 2) + 25),
|
|
||||||
Cos(180 - iAngle + (R),(Amount / 2) + 25),
|
|
||||||
Max(i + 30, 90) + 75,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue