Separate out concrete part of world
This commit is contained in:
+4
-4
@@ -27,20 +27,20 @@ flameBeamCombine (p,(a,b,_),(x,y,_))
|
||||
lasBeamCombine :: (Point2,(Point2,Point2,Beam),(Point2,Point2,Beam))
|
||||
-> World -> World
|
||||
lasBeamCombine (p,(a,b,_),(x,y,_))
|
||||
= lasers .:~ lasRayAt yellow 11 1 p (argV (normalizeV (b-.-a)+.+normalizeV (y-.-x)))
|
||||
= cWorld . lasers .:~ lasRayAt yellow 11 1 p (argV (normalizeV (b-.-a)+.+normalizeV (y-.-x)))
|
||||
|
||||
splitBeamCombine :: (Point2,(Point2,Point2,Beam),(Point2,Point2,Beam))
|
||||
-> World -> World
|
||||
splitBeamCombine (p,(a,b,_),(x,y,_))
|
||||
= (lasers .:~ lasRayAt yellow 11 1 p (dir+0.5*pi))
|
||||
. (lasers .:~ lasRayAt yellow 11 1 p (dir-0.5*pi))
|
||||
= (cWorld . lasers .:~ lasRayAt yellow 11 1 p (dir+0.5*pi))
|
||||
. (cWorld . lasers .:~ lasRayAt yellow 11 1 p (dir-0.5*pi))
|
||||
where
|
||||
dir = argV (normalizeV (b-.-a)+.+normalizeV (y-.-x))
|
||||
|
||||
teslaBeamCombine :: (Point2,(Point2,Point2,Beam),(Point2,Point2,Beam))
|
||||
-> World -> World
|
||||
teslaBeamCombine (p,(a,b,bm),(x,y,_)) w
|
||||
= w' & pointToItem (_itemPositions w IM.! itid) . itParams . subParams ?~ ip
|
||||
= w' & pointToItem (_itemPositions (_cWorld w) IM.! itid) . itParams . subParams ?~ ip
|
||||
where
|
||||
itid = fromJust $ _bmOrigin bm
|
||||
dir = argV (normalizeV (b-.-a)+.+normalizeV (y-.-x))
|
||||
|
||||
Reference in New Issue
Block a user