Split out more data files
This commit is contained in:
+7
-1
@@ -5,6 +5,7 @@ Description : Simulation update
|
||||
-}
|
||||
module Dodge.Update ( updateUniverse ) where
|
||||
import Dodge.Data
|
||||
import Dodge.Update.Cloud
|
||||
import Dodge.Machine.Update
|
||||
import Dodge.RadarBlip
|
||||
import Dodge.Flare
|
||||
@@ -348,10 +349,15 @@ updateClouds w = w' & clouds .~ catMaybes mclouds
|
||||
-- cls = _clouds w
|
||||
(w',mclouds) = mapAccumR updateCloud w (_clouds w)
|
||||
|
||||
cloudEffect :: Cloud -> World -> World
|
||||
cloudEffect cl = case _clType cl of
|
||||
GasCloud -> cloudPoisonDamage cl
|
||||
SmokeCloud -> id
|
||||
|
||||
updateCloud :: World -> Cloud -> (World,Maybe Cloud)
|
||||
updateCloud w c
|
||||
| _clTimer c < 1 = (w, Nothing)
|
||||
| otherwise = (_clEffect c c w, Just $ c
|
||||
| otherwise = (cloudEffect c w, Just $ c
|
||||
& clPos .~ finalPos
|
||||
& clVel .~ finalVel
|
||||
& clTimer -~ 1
|
||||
|
||||
Reference in New Issue
Block a user