Cleanup
This commit is contained in:
@@ -2,12 +2,12 @@ module Dodge.Particle.Damage where
|
||||
import Dodge.Data
|
||||
import Geometry
|
||||
|
||||
simpleDam :: DamageType -> Int -> Particle -> Point2 -> [Damage]
|
||||
simpleDam dt amount bt p = [ Damage dt amount sp p ep NoDamageEffect ]
|
||||
where
|
||||
sp = _ptPos bt
|
||||
bulVel = _ptVel bt
|
||||
ep = sp +.+ bulVel
|
||||
--simpleDam :: DamageType -> Int -> Particle -> Point2 -> [Damage]
|
||||
--simpleDam dt amount bt p = [ Damage dt amount sp p ep NoDamageEffect ]
|
||||
-- where
|
||||
-- sp = _ptPos bt
|
||||
-- bulVel = _ptVel bt
|
||||
-- ep = sp +.+ bulVel
|
||||
simpleDam' :: DamageType -> Int -> Bullet -> Point2 -> [Damage]
|
||||
simpleDam' dt amount bt p = [ Damage dt amount sp p ep NoDamageEffect ]
|
||||
where
|
||||
|
||||
@@ -6,7 +6,6 @@ import Picture
|
||||
drawParticle :: Particle -> Picture
|
||||
drawParticle pt = case pt of
|
||||
Shockwave {} -> drawShockwave pt
|
||||
PtStaticBall {} -> drawStaticBall pt
|
||||
PtInvShockwave {} -> drawInverseShockwave pt
|
||||
PtTeslaArc {} -> drawTeslaArc pt
|
||||
PtTargetLaser {} -> drawTargetLaser pt
|
||||
@@ -27,15 +26,6 @@ drawShockwave pt = setDepth 20
|
||||
rad = r - (3/4) * r * tFraction
|
||||
tFraction = fromIntegral (_ptTimer pt) / fromIntegral (_ptMaxTime pt)
|
||||
|
||||
drawStaticBall
|
||||
:: Particle
|
||||
-> Picture
|
||||
drawStaticBall pt = setLayer BloomNoZWrite
|
||||
. setDepth (_ptZ pt + 20)
|
||||
. uncurryV translate (_ptPos pt)
|
||||
$ circleSolidCol (_ptColor pt) (withAlpha 0.5 white) (_ptWidth pt+5)
|
||||
|
||||
|
||||
drawInverseShockwave :: Particle -> Picture
|
||||
drawInverseShockwave pt
|
||||
= setLayer BloomLayer $ setDepth 20 $ uncurryV translate p
|
||||
|
||||
Reference in New Issue
Block a user