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