Add toggle for shadows on clouds

This commit is contained in:
2021-09-03 23:47:22 +01:00
parent fd85093833
commit 1ab3f1773c
6 changed files with 38 additions and 43 deletions
+4 -5
View File
@@ -34,7 +34,6 @@ import Data.Function (on)
import Data.List
import Data.Maybe
import Data.Tuple
aFlameParticle
:: Int -- ^ Timer
-> Point2 -- ^ Position
@@ -330,7 +329,7 @@ moveTeslaArc
moveTeslaArc p d w pt
| t == 2 =
(foldr damCrs w hitCrs & randGen .~ g
& createSparkCol 8 nc q2 (argV sv + d1) Nothing
& createSparkCol 8 nc q2 (argV sv + d1)
, Just $ pt
& ptTimer -~ 1
& ptPoints .~ ps'
@@ -453,8 +452,8 @@ crOrWall p dir w = fromMaybe (E3x3 $ p +.+ rotateV dir (V2 arcLen 0))
-- | Create a spark.
-- If the spark is created by another Particle, it cannot be directly added to
-- the list, hence the redirect through worldEvents.
createSparkCol :: Int -> Color -> Point2 -> Float -> Maybe Int -> World -> World
createSparkCol time col pos dir maycid w
createSparkCol :: Int -> Color -> Point2 -> Float -> World -> World
createSparkCol time col pos dir w
= w & worldEvents %~ ( over particles (spark :) . )
where
spark = BulletPt
@@ -463,7 +462,7 @@ createSparkCol time col pos dir maycid w
, _btVel' = rotateV dir (V2 5 0)
, _btColor' = col
, _btTrail' = [pos]
, _btPassThrough' = maycid
, _btPassThrough' = Nothing
, _btWidth' = 1
, _btTimer' = time
, _btHitEffect' = destroyOnImpact sparkEff noEff noEff