Make thingsHit use streaming

This commit is contained in:
2022-06-26 12:13:31 +01:00
parent f47059ae9b
commit 5ba0ca9f9c
8 changed files with 49 additions and 61 deletions
+2 -1
View File
@@ -77,6 +77,7 @@ import qualified Data.IntMap.Strict as IM
import qualified Data.Map.Strict as M
import qualified Data.Text as T
import SDL (Scancode, MouseButton)
import Streaming
type CRUpdate = Creature -> World -> (World -> World, Maybe Creature)
type CRUpdate' = Creature -> World -> (World -> World, Creature)
@@ -688,7 +689,7 @@ data Particle
, _ptCenter :: Point2
}
type HitEffect = Particle
-> [(Point2, Either Creature Wall)]
-> Stream (Of (Point2, Either Creature Wall)) Identity ()
-> World
-> (World,Maybe Particle)