コード例 #1
0
ファイル: Explode.c プロジェクト: Meowtimer/openclonk
global func BlueExplosionEffect(int level, int x, int y)
{
	var glimmer =
	{
		Prototype = Particles_Glimmer(),
		R = PV_Random(100, 150),
		G = PV_Random(100, 150),
		B = PV_Random(200, 255)
	};
	var fire =
	{
		Prototype = Particles_Fire(),
		R = PV_Random(100, 150),
		G = PV_Random(100, 150),
		B = PV_Random(200, 255),
		Size = PV_Random(level/2, level/3)
	};
	var smoke =
	{
		Prototype = Particles_SmokeTrail(),
		R = PV_Linear(PV_Random(100, 150), 0),
		G = PV_Linear(PV_Random(100, 150), 0),
		B = PV_Linear(PV_Random(200, 255), 0),
		Size = PV_Random(level - 5, level + 5)
	};
	// Blast particle.
	CreateParticle("SmokeDirty", x, y, PV_Random(-2, 2), PV_Random(-2, 2), PV_Random(20, 40), smoke, 10);
	CreateParticle("MagicFire", x, y, PV_Random(-20, 20), PV_Random(-20, 20), PV_Random(5, 10), fire, 20);
	if(!GBackLiquid(x,y)) CreateParticle("SphereSpark", x, y, PV_Random(-100, 100), PV_Random(-100, 100), PV_Random(5, 36 * 3), glimmer, level);

	if(GBackLiquid(x,y)) CastObjects(Fx_Bubble, level * 4 / 10, level, x, y);
	return;
}
コード例 #2
0
ファイル: Scorches.c プロジェクト: Fulgen301/openclonk
global func FxFireScorchingTimer(object target, proplist effect, int time)
{
	if (time >= effect.duration) { RemoveObject(); return FX_Execute_Kill; }
	// particles
	var wind = BoundBy(GetWind(), -5, 5);
	CreateParticle("SmokeDirty", PV_Random(-5, 5), PV_Random(-5, 5), wind, -effect.strength/8, PV_Random(20, 40), Particles_SmokeTrail(), 2);
	return FX_OK;
}