Separate out concrete part of world
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user