forked from Mirrors/openclonk
adapted Flash particle and usages to new particle system
parent
defc8f4f3b
commit
2139e950f1
|
@ -1,12 +1,3 @@
|
|||
[Particle]
|
||||
Name=Flash
|
||||
MaxCount=6200
|
||||
InitFn=StdInit
|
||||
ExecFn=StdExec
|
||||
DrawFn=Std
|
||||
Face=0,0,64,64,-32,-32
|
||||
Delay=0
|
||||
Repeats=1
|
||||
Reverse=0
|
||||
AlphaFade=48
|
||||
Additive=1
|
|
@ -177,7 +177,8 @@ private func FireWeapon(object clonk, int angle)
|
|||
CreateParticle("ExploSmoke",IX,IY,+Sin(r,speed)+RandomX(-2,2),-Cos(r,speed)+RandomX(-2,2),RandomX(100,400),RGBa(255,255,255,50));
|
||||
}
|
||||
CreateParticle("MuzzleFlash",IX,IY,+Sin(angle,500),-Cos(angle,500),450,RGB(255,255,255),clonk);
|
||||
CreateParticle("Flash",0,0,0,0,800,RGBa(255,255,64,150));
|
||||
|
||||
CreateParticleEx("Flash", 0, 0, 0, 0, 8, Particles_Flash());
|
||||
}
|
||||
|
||||
func RejectCollect(id shotid, object shot)
|
||||
|
|
|
@ -175,7 +175,7 @@ private func FireWeapon(object clonk, int angle)
|
|||
CreateParticle("ExploSmoke",IX,IY,+Sin(r,speed)+RandomX(-2,2),-Cos(r,speed)+RandomX(-2,2),RandomX(100,400),RGBa(255,255,255,50));
|
||||
}
|
||||
CreateParticle("MuzzleFlash",IX,IY,+Sin(angle,500),-Cos(angle,500),450,RGB(255,255,255),clonk);
|
||||
CreateParticle("Flash",0,0,0,0,800,RGBa(255,255,64,150));
|
||||
CreateParticleEx("Flash", 0, 0, 0, 0, 8, Particles_Flash());
|
||||
}
|
||||
|
||||
func RejectCollect(id shotid, object shot)
|
||||
|
|
|
@ -82,7 +82,7 @@ func FxAutoSellValuablesTimer(_, effect, time)
|
|||
|
||||
value += valuable->GetValue();
|
||||
|
||||
CreateParticle("Flash", valuable->GetX() - GetX(), valuable->GetY() - GetY(), 0, 0, 10 * Max(5, Max(valuable->GetDefWidth(), valuable->GetDefHeight())), RGB(255,255,50));
|
||||
CreateParticleEx("Flash", valuable->GetX() - GetX(), valuable->GetY() - GetY(), 0, 0, 8, { Prototype = Particles_Flash(), Size = 2 * Max(5, Max(valuable->GetDefWidth(), valuable->GetDefHeight())) });
|
||||
CreateParticleEx("Dust", valuable->GetX() - GetX(), valuable->GetY() - GetY(), PV_Random(-10, 10), PV_Random(-10, 10), PV_Random(18, 36), dust_particles, 10);
|
||||
valuable->RemoveObject();
|
||||
}
|
||||
|
|
|
@ -76,7 +76,7 @@ public func ContainedUseStop(object clonk, int ix, int iy)
|
|||
CreateParticle("ExploSmoke",IX,IY,+Sin(r,speed)+RandomX(-2,2) + GetXDir()/2,-Cos(r,speed)+RandomX(-2,2) + GetYDir()/2,RandomX(100,400),RGBa(255,255,255,50));
|
||||
}
|
||||
CreateParticle("MuzzleFlash",IX,IY,+Sin(angle,500),-Cos(angle,500),600,RGB(255,255,255),this);
|
||||
CreateParticle("Flash",0,0,GetXDir(),GetYDir(),800,RGBa(255,255,64,150));
|
||||
CreateParticleEx("Flash", 0, 0, GetXDir(), GetYDir(), 8, Particles_Flash());
|
||||
|
||||
AddEffect("IntCooldown", this,1,1,this);
|
||||
}
|
||||
|
|
|
@ -275,7 +275,7 @@ protected func DoFire(object iammo, object clonk, int angle)
|
|||
var dist = 25;
|
||||
var px = Cos(r/angPrec - 90,dist);
|
||||
var py = Sin(r/angPrec - 90,dist) - 4;
|
||||
CreateParticle("Flash",px,py,0,0,420,RGB(255,255,255));
|
||||
CreateParticleEx("Flash", px, py, 0, 0, 8, Particles_Flash());
|
||||
for(var i=0; i<15; ++i) //liberated from musket script... I'm horrible at particles :p
|
||||
{
|
||||
var speed = RandomX(0,10);
|
||||
|
|
Loading…
Reference in New Issue