Separate out concrete part of world
This commit is contained in:
@@ -56,10 +56,10 @@ moveTeslaArc w pt
|
||||
makesparks = makeaspark . makeaspark . makeaspark
|
||||
(lp,ld) = case last thearc of
|
||||
ArcStep lp' ld' NothingID -> (lp',ld')
|
||||
ArcStep lp' ld' (CrID crid) -> case w ^? creatures . ix crid of
|
||||
ArcStep lp' ld' (CrID crid) -> case w ^? cWorld . creatures . ix crid of
|
||||
Nothing -> (lp',ld')
|
||||
Just cr -> (lp' -.- (_crRad cr + 1) *.* unitVectorAtAngle ld',ld'+pi)
|
||||
ArcStep lp' ld' (WlID wlid) -> case w ^? walls . ix wlid of
|
||||
ArcStep lp' ld' (WlID wlid) -> case w ^? cWorld . walls . ix wlid of
|
||||
Nothing -> (lp',ld')
|
||||
Just _ -> (lp' -.- 2 *.* unitVectorAtAngle ld',ld'+pi)
|
||||
--damthings (ArcStep _ _ NothingID) = id
|
||||
@@ -71,7 +71,7 @@ moveTeslaArc w pt
|
||||
shootTeslaArc' :: ItemParams -> Point2 -> Float -> World -> (World,ItemParams)
|
||||
shootTeslaArc' ip pos dir w =
|
||||
(w & randGen .~ g
|
||||
& teslaArcs .:~ aTeslaArcAt col newarc
|
||||
& cWorld . teslaArcs .:~ aTeslaArcAt col newarc
|
||||
, ip & currentArc ?~ newarc
|
||||
)
|
||||
where
|
||||
|
||||
Reference in New Issue
Block a user