Allow tweaking z buffer when rendering polygon, improve explosion render
This commit is contained in:
@@ -98,7 +98,7 @@ doThrust pj w = w
|
||||
& randGen .~ g
|
||||
& projectiles . ix i . pjVel %~ (\v -> accel +.+ frict *.* v)
|
||||
& soundFromPos (ShellSound i) newPos (fromIntegral smokeTrailSound) 1 250
|
||||
& makeFlameletTimed (oldPos -.- vel) (vel +.+ rotateV (pi+sparkD) accel) Nothing 3 10
|
||||
& makeFlameletTimed (oldPos -.- vel) 0 (vel +.+ rotateV (pi+sparkD) accel) Nothing 3 10
|
||||
& smokeGen
|
||||
where
|
||||
accel = _pjAcc pj
|
||||
@@ -172,16 +172,11 @@ reduceSpinBy :: Float -> Projectile -> World -> World
|
||||
reduceSpinBy x pj = projectiles . ix (_pjID pj) . pjSpin *~ x
|
||||
|
||||
shellPic :: Projectile -> Picture
|
||||
shellPic pj
|
||||
| t > 40 = onLayerL [levLayer CrLayer - 2]
|
||||
$ uncurry translate pos $ rotate (argV accel) basePic
|
||||
| otherwise = onLayer PtLayer $ uncurry translate pos $ rotate (argV accel) basePic
|
||||
shellPic pj = setDepth 20 . uncurry translate pos $ rotate (argV accel) basePic
|
||||
where
|
||||
basePic = color black $ polygon [(-6,4),(-6,-4),(6,-4),(8,0),(6,4)]
|
||||
accel = _pjAcc pj
|
||||
pos = _pjPos pj
|
||||
t = _pjTimer pj
|
||||
|
||||
|
||||
pjEffTimeRange
|
||||
:: (Int,Int)
|
||||
|
||||
Reference in New Issue
Block a user