Cleanup bullet damage
This commit is contained in:
@@ -9,6 +9,7 @@ import Dodge.Data
|
||||
import Dodge.Data.DamageType
|
||||
import Dodge.WorldEvent.SpawnParticle
|
||||
import Dodge.WorldEvent.Cloud
|
||||
import Dodge.Wall.Reflect
|
||||
import Geometry
|
||||
import Geometry.Vector3D
|
||||
import Color
|
||||
@@ -41,8 +42,6 @@ wallEff dt wl = case dt of
|
||||
pSparkCol = brightX 100 1.5 white
|
||||
lSparkCol = V4 20 (-5) 0 1
|
||||
|
||||
reflDirWall :: Point2 -> Point2 -> Wall -> Float
|
||||
reflDirWall sp ep wl = argV (reflectIn (uncurry (-.-) (_wlLine wl)) (ep -.- sp))
|
||||
|
||||
damageBlockWith :: DamageType -> Block -> Block
|
||||
damageBlockWith dt = case dt of
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
module Dodge.Wall.Reflect
|
||||
where
|
||||
import Geometry
|
||||
import Dodge.Data
|
||||
|
||||
reflDirWall :: Point2 -> Point2 -> Wall -> Float
|
||||
reflDirWall sp ep wl = argV (reflectIn (uncurry (-.-) (_wlLine wl)) (ep -.- sp))
|
||||
|
||||
-- point free nonsense
|
||||
reflVelWall :: Wall -> Point2 -> Point2
|
||||
reflVelWall = reflectIn . uncurry (-.-) . _wlLine
|
||||
Reference in New Issue
Block a user