Simplify sparks

This commit is contained in:
2025-06-07 10:07:16 +01:00
parent 7bee1549bf
commit b4bdfbf2c3
13 changed files with 101 additions and 102 deletions
+1 -3
View File
@@ -1,6 +1,5 @@
module Dodge.PosEvent where
import Color
import Control.Monad.State
import Dodge.Data.World
import Dodge.Spark
@@ -18,8 +17,7 @@ posEventEffect pv = case _pvType pv of
SparkSpawner -> spawnElectricalSparks (_pvPos pv)
spawnElectricalSparks :: Point2 -> World -> World
spawnElectricalSparks = randSpark ELECTRICAL rspeed rcol rdir
spawnElectricalSparks = randSpark ElectricSpark rspeed rdir
where
rspeed = state (randomR (3, 6))
rcol = brightX 100 1.5 <$> takeOne [white, azure, blue, cyan]
rdir = state $ randomR (0, 2 * pi)