Reogranise drawing in main

This commit is contained in:
2021-03-31 11:27:45 +02:00
parent 89c3ff96c8
commit e62ff391a5
7 changed files with 99 additions and 44 deletions
+2 -1
View File
@@ -5,6 +5,7 @@ import Dodge.Base
import Dodge.Default
import Dodge.CreatureState
import Dodge.LightSources
import Dodge.WorldEvent.Flash
import Dodge.WorldEvent.Sound
@@ -34,7 +35,7 @@ updateLamp :: Int -> CRUpdate
updateLamp i = unrandUpdate handleLS internalUpdate
where
handleLS cr w
| _crHP cr < 0 = mkSoundBreakGlass w & lightSources %~ IM.delete i
| _crHP cr < 0 = explosionFlashAt (_crPos cr) $ mkSoundBreakGlass w & lightSources %~ IM.delete i
| otherwise = w & lightSources . ix i . lsPos .~ _crPos cr
internalUpdate cr
| _crHP cr < 0 = Nothing