-- Set the particle texture
pAge = Allocate(1);

SetTexture("fx/images/etincelle");
SetBlendMode(kBlendNormal);

SetNumParticles(30);    -- Create some particles

pPosition:Init( fRange( Vec2(-30,-50), Vec2(30,40) ) + dLocus);
pColor:Init( Color(1,1,1,1) );
pScale:Init( fRange(0.2,0.5) );
pUp:Init( f2dRadius( fRange(0,1) ) );   -- random radius
pAge:Init(0);

-- Move the particles
pAge:Anim(pAge + fAge());
pPosition:Anim( pPosition + fTimeScale( Vec2(0,60) ) );

pColor:Anim(fFade(pAge,fPick(Color(1,1,1,1),Color(1,1,1,0)),500,Color(1,1,1,1))    );




-- Expire particles lower than 300
Anim( fExpire( fGreater(pAge,500) ) );


function Update(seconds)
   CreateParticles(seconds*60);
end