SpawnExplosion
to the engine
class. The parameters are the number of particles and their position.Method SpawnExplosion:Int(amount:Int, xp:Int, yp:Int)
g.layerGFX
.SetDefaultLayer(g.layerGFX)
1
to amount
.For Local i:Int = 1 To amount
Local explo:ftObject = CreateImage(g.atlas, 128, 0,32,32, xp, yp)
explo.SetScale(Rnd(2,12)/10) explo.SetAngle(Rnd(0,359)) explo.SetSpin(Rnd(-4,4)) explo.SetSpeed(Rnd(1,2))
g.sndExplo.Play()
g.tmObjRemove
.CreateObjTimer(explo, g.tmObjRemove, Rnd(100,2000))
Next Return 0 End
18.226.185.96