Tweak energyballs
This commit is contained in:
+10
-7
@@ -13,6 +13,7 @@ import Data.List (foldl')
|
||||
import Data.Maybe
|
||||
import Dodge.Base.Collide
|
||||
import Dodge.Data.World
|
||||
import Dodge.SoundLogic
|
||||
import Dodge.Spark
|
||||
import Dodge.WorldEvent.ThingsHit
|
||||
import Geometry
|
||||
@@ -47,12 +48,14 @@ updateEnergyBall w eb
|
||||
|
||||
ebEffect :: EnergyBall -> World -> World
|
||||
ebEffect eb = case _ebEff eb of
|
||||
ElectricalBall -> randSparkExtraVel
|
||||
(_ebVel eb)
|
||||
ElectricSpark
|
||||
(state (randomR (3, 6)))
|
||||
(state (randomR (0, 2 * pi)))
|
||||
(_ebPos eb)
|
||||
ElectricalBall ->
|
||||
soundContinue (EBSound 0) (_ebPos eb) elecCrackleS (Just 2)
|
||||
. randSparkExtraVel
|
||||
(_ebVel eb)
|
||||
ElectricSpark
|
||||
(state (randomR (3, 6)))
|
||||
(state (randomR (0, 2 * pi)))
|
||||
(_ebPos eb)
|
||||
_ -> id
|
||||
|
||||
energyBallAt :: EnergyBallType -> Point2 -> World -> World
|
||||
@@ -85,7 +88,7 @@ ebFlicker :: EnergyBall -> World -> World
|
||||
ebFlicker pt
|
||||
| _ebTimer pt `mod` 7 == 0 =
|
||||
cWorld . lWorld . lights
|
||||
.:~ LSParam (addZ 20 $ _ebPos pt) 70 (0.5 * xyzV4 (ebColor pt))
|
||||
.:~ LSParam (addZ 5 $ _ebPos pt) 70 (0.5 * xyzV4 (ebColor pt))
|
||||
| otherwise = id
|
||||
|
||||
ebColor :: EnergyBall -> Color
|
||||
|
||||
Reference in New Issue
Block a user