Simplify creature update
This commit is contained in:
@@ -404,7 +404,7 @@ shootTeslaArc' :: ItemParams -> Point2 -> Float -> World -> (World,ItemParams)
|
||||
shootTeslaArc' ip pos dir w =
|
||||
(w & randGen .~ g
|
||||
& instantParticles .:~ aTeslaArcAt col newarc
|
||||
, ip & currentArc .~ Just newarc
|
||||
, ip & currentArc ?~ newarc
|
||||
)
|
||||
where
|
||||
(col,g) = takeOne [white,azure,blue,cyan] & runState $ _randGen w
|
||||
@@ -487,6 +487,7 @@ shootLaser it cr = instantParticles .:~ lasRayAt (_lasColor $ _itParams it) dam
|
||||
phasev = _phaseV . _itParams $ _crInv cr IM.! _crInvSel cr
|
||||
dam = _lasDamage $ _itParams it
|
||||
|
||||
|
||||
shootDualLaser :: Item -> Creature -> World -> World
|
||||
shootDualLaser it cr w = w'
|
||||
& newBeams . positronBeams .:~ dualRayAt (_lasBeam $ _itParams it) itid w (_lasColor $ _itParams it) dam phasev posl dirl
|
||||
|
||||
Reference in New Issue
Block a user