Simplify sparks
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user