This commit is contained in:
2025-01-06 12:23:59 +00:00
parent ffe5198e46
commit 6ba16b06fb
3 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -1,3 +1,4 @@
{-# LANGUAGE LambdaCase #-}
module Dodge.Payload (
usePayload,
) where
@@ -15,7 +16,7 @@ import Geometry.Data
import LensHelp
usePayload :: Payload -> Point2 -> Point2 -> World -> World
usePayload payload = case payload of
usePayload = \case
ExplosionPayload -> makeExplosionAt
ShrapnelBomb -> makeShrapnelAt
DudPayload -> const (const id)
@@ -29,7 +30,6 @@ makeShrapnelAt p v w =
& makeShockwaveAt [] p 50 5 0 white
& cWorld . lWorld . bullets .++~ buls
where
-- speed = magV v
vs = replicateM 75 (randInCirc 10) & evalState $ _randGen w
drags :: [Float]
drags = replicateM 75 (state $ randomR (0.85,0.9)) & evalState $ _randGen w