Add wall dust when destroying a block
This commit is contained in:
@@ -6,11 +6,10 @@ module Dodge.Wall.Damage
|
||||
, damageWall
|
||||
) where
|
||||
import Dodge.Data
|
||||
import Dodge.WorldEvent.Cloud
|
||||
import Dodge.Wall.Reflect
|
||||
import Dodge.Wall.Dust
|
||||
import Dodge.Particle.Spark
|
||||
import Geometry
|
||||
import Geometry.Vector3D
|
||||
import Color
|
||||
|
||||
import Control.Lens
|
||||
@@ -26,8 +25,8 @@ wallEff :: DamageType -> Wall -> World -> World
|
||||
wallEff dt wl = case dt of
|
||||
Lasering _ sp p _ -> colSpark 8 lSparkCol (outTo sp p) (reflDirWall sp p wl)
|
||||
Piercing _ sp p _ -> colSpark' 0.2 8 pSparkCol (outTo sp p) (reflDirWall sp p wl)
|
||||
. smokeCloudAt dustcol 20 200 1 (addZ 20 (outTo sp p))
|
||||
Blunt _ sp p _ -> smokeCloudAt dustcol 20 200 1 (addZ 20 (outTo sp p))
|
||||
. wlDustAt wl (outTo sp p)
|
||||
Blunt _ sp p _ -> wlDustAt wl (outTo sp p)
|
||||
Cutting {} -> id
|
||||
SparkDam {} -> id
|
||||
Flaming {} -> id
|
||||
@@ -38,7 +37,6 @@ wallEff dt wl = case dt of
|
||||
PoisonDam {} -> id
|
||||
where
|
||||
outTo sp p = p +.+ safeNormalizeV (sp -.- p)
|
||||
dustcol = _wlColor wl & _4 .~ 1
|
||||
pSparkCol = brightX 100 1.5 white
|
||||
lSparkCol = V4 20 (-5) 0 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user