Tweak sparks
This commit is contained in:
@@ -5,14 +5,13 @@ import Dodge.Particle.Bullet.Spawn
|
||||
import Dodge.Wall.Reflect
|
||||
import Dodge.Wall.Dust
|
||||
import Geometry
|
||||
import Color
|
||||
import LensHelp
|
||||
|
||||
import Control.Monad.State
|
||||
|
||||
defaultWallDamage :: Damage -> Wall -> World -> World
|
||||
defaultWallDamage dm wl = wallDamageEffect dm wl . case _dmType dm of
|
||||
Lasering -> colSpark 8 lSparkCol outTo (reflDirWall sp p wl)
|
||||
Lasering -> colSparkRandDir 0.2 8 lSparkCol outTo (reflDirWall sp p wl)
|
||||
Piercing -> colSparkRandDir 0.2 8 pSparkCol outTo (reflDirWall sp p wl)
|
||||
. wlDustAt wl outTo
|
||||
Blunt -> wlDustAt wl outTo
|
||||
@@ -27,9 +26,9 @@ defaultWallDamage dm wl = wallDamageEffect dm wl . case _dmType dm of
|
||||
PoisonDam -> id
|
||||
where
|
||||
sp = _dmFrom dm
|
||||
p = _dmTo dm
|
||||
p = _dmAt dm
|
||||
outTo = p +.+ squashNormalizeV (sp -.- p)
|
||||
pSparkCol = brightX 100 1.5 white
|
||||
pSparkCol = V4 5 1 0.5 2
|
||||
lSparkCol = V4 20 (-5) 0 1
|
||||
|
||||
wallDamageEffect :: Damage -> Wall -> World -> World
|
||||
@@ -37,8 +36,8 @@ wallDamageEffect dm wl w = case _dmEffect dm of
|
||||
BounceBullet bt -> w & instantParticles .:~ thebouncer
|
||||
where
|
||||
reflectVel = reflVelWall wl (_ptVel bt)
|
||||
thebouncer = (aBulAt Nothing id (Just (_ptColor bt)) Nothing pOut reflectVel (_btDrag bt) (_ptHitEff bt) (_ptWidth bt)
|
||||
) {_ptTimer = _ptTimer bt - 1}
|
||||
thebouncer = aBulAt Nothing id (Just (_ptColor bt)) Nothing pOut reflectVel (_btDrag bt) (_ptHitEff bt) (_ptWidth bt)
|
||||
& ptTimer .~ _ptTimer bt - 1
|
||||
pOut = p +.+ squashNormalizeV (sp -.- p)
|
||||
p = _dmAt dm
|
||||
sp = _dmFrom dm
|
||||
|
||||
Reference in New Issue
Block a user