Randomize explosion variance

This commit is contained in:
Martijn de Boer 2022-10-15 17:45:43 +02:00
parent b40e21afe7
commit 7f975fddc8
No known key found for this signature in database
GPG key ID: 9D2E42402DD372D1

View file

@ -241,8 +241,8 @@ function GameScene:generateExplosion(px,py)
GameScene.explosionObj = {angle=100, radius=100}
GameScene.godsrayObj = {weight=0}
flux.to(GameScene.explosionObj, 0.5, {angle= 100, radius=1600}):ease("quintout"):after( GameScene.explosionObj, 0.5, { angle= 100, radius= 100 })
flux.to(GameScene.godsrayObj, 0.5, {weight=100}):ease("quintout"):after( GameScene.godsrayObj, 0.5, { weight=1 })
flux.to(GameScene.explosionObj, 0.5, {angle= GameScene:variance(100,90), radius=GameScene:variance(1600, 150)}):ease("quintout"):after( GameScene.explosionObj, 0.5, { angle= 100, radius= 100 })
flux.to(GameScene.godsrayObj, 0.5, {weight=GameScene:variance(100,50)}):ease("quintout"):after( GameScene.godsrayObj, 0.5, { weight=1 })
eSystem:emit(32)
end