Refactor beams
This commit is contained in:
+2
-1
@@ -5,6 +5,7 @@ Description : Simulation update
|
||||
-}
|
||||
module Dodge.Update ( updateUniverse ) where
|
||||
import Dodge.Data
|
||||
import Dodge.Beam
|
||||
import Dodge.Projectile.Update
|
||||
import Dodge.Creature.Update
|
||||
import Dodge.RadarSweep
|
||||
@@ -270,7 +271,7 @@ combineBeams wbeams w = w''
|
||||
combineBeamBeams :: [Beam] -> World -> Beam -> (World,Beam)
|
||||
combineBeamBeams bms w bm = case intersectBeamBeams bm bms of
|
||||
(ps,Nothing) -> (w, bm & bmFirstPoints .~ ps)
|
||||
(ps,Just a) -> (_beamCombine (_bmType bm) a w, bm & bmFirstPoints .~ ps)
|
||||
(ps,Just a) -> (doBeamCombine (_beamCombine (_bmType bm)) a w, bm & bmFirstPoints .~ ps)
|
||||
|
||||
-- intersect a beam with a list of beams.
|
||||
-- returns the (reversed) travel of the beam up to maybe an intersection point
|
||||
|
||||
Reference in New Issue
Block a user