Separate out concrete part of world

This commit is contained in:
2022-07-25 12:10:50 +01:00
parent 3354d108be
commit b2efbd2b3e
134 changed files with 933 additions and 930 deletions
+2 -2
View File
@@ -22,7 +22,7 @@ fireShell it cr = makeShell it cr
spinamount = _shellSpinAmount params
thrustdelay = _shellThrustDelay params
makeShell :: Item -> Creature -> [ProjectileUpdate] -> World -> World
makeShell it cr theupdate w = w & projectiles %~ IM.insert i Shell
makeShell it cr theupdate w = w & cWorld . projectiles %~ IM.insert i Shell
{ _prjPos = pos
, _prjZ = 20
, _prjStartPos = pos
@@ -38,7 +38,7 @@ makeShell it cr theupdate w = w & projectiles %~ IM.insert i Shell
, _prjMITID = _itID it
}
where
i = IM.newKey $ _props w
i = IM.newKey $ _props (_cWorld w)
dir = _crDir cr
pos = _crPos cr +.+ rotateV dir (V2 (_crRad cr + 1) 0)
am = _itConsumption it