From 7f975fddc800bd9071698bebdb8c284d88442dd6 Mon Sep 17 00:00:00 2001 From: Martijn de Boer Date: Sat, 15 Oct 2022 17:45:43 +0200 Subject: [PATCH] Randomize explosion variance --- scene/game.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scene/game.lua b/scene/game.lua index 5034760..7db9075 100644 --- a/scene/game.lua +++ b/scene/game.lua @@ -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