adapted Air particle and usages to new particle system

stable-5.4
David Dormagen 2013-11-08 13:28:40 +01:00
parent 55fc0f6dd7
commit 81924b1503
5 changed files with 5 additions and 51 deletions

View File

@ -1,17 +1,3 @@
[Particle]
Name=Air
MaxCount=1500
InitFn=StdInit
ExecFn=StdExec
CollisionFn=Bounce
DrawFn=Std
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

View File

@ -13,12 +13,7 @@ protected func Initialize()
AddEffect("Float",this,1,1,this);
//Special Effects
var i = 0;
while(i <= 7)
{
CreateParticle("Air", 0,16,-3 + Random(7),Random(2),RandomX(70,150),RGB(255,255,255), this);
++i;
}
CreateParticleEx("Air", PV_Random(-1, 1), PV_Random(15, 17), PV_Random(-3, 3), PV_Random(0, 2), 18, Particles_Air(), 20);
}
private func Deflate()
@ -33,7 +28,8 @@ private func Deflate()
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()

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

View File

@ -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

View File

@ -84,13 +84,7 @@ protected func Load()
sound=true;
}
Amount += 2; //Air is sucked in.
CreateParticle("AirIntake",
SX,SY,
Sin(A + R,-D / 2),
Cos(A + R,-D / 2),
RandomX(35,80),
RGBa(255,255,255,128)
);
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)});
}
else if(GBackSolid(0,0) || GBackLiquid(0,0))
{
@ -130,12 +124,7 @@ private func FireWeapon(object pClonk,iX,iY)
if(!GBackSolid(SX,SY))
{
CreateParticle("Air",
SX,SY,
Sin(180 - iAngle + (R),(Amount / 2) + 25),
Cos(180 - iAngle + (R),(Amount / 2) + 25),
Max(i + 30, 90) + 75,
);
CreateParticleEx("Air", SX, SY, Sin(180 - iAngle + (R),(Amount / 2) + 25), Cos(180 - iAngle + (R),(Amount / 2) + 25), 36, Particles_Air());
}
}