Add electrical bullets

This commit is contained in:
2022-03-22 21:45:08 +00:00
parent bda65968b0
commit f030d8264f
10 changed files with 202 additions and 57 deletions
+5 -4
View File
@@ -13,7 +13,7 @@ module Dodge.WorldEvent.Flash
, laserGunFlashAt
, teslaGunFlashAt
, muzFlareAt
, flameFlicker
, ptFlicker
) where
import Dodge.Data
import Dodge.LightSource
@@ -61,8 +61,9 @@ explosionFlashAt p = tempLightSources .:~ tlsTimeRadFunPos 20 150 intensityFunc
| x < 10 = 1 / (10 - fromIntegral x)
| otherwise = 1
flameFlicker :: Particle -> World -> World
flameFlicker pt
ptFlicker :: Particle -> World -> World
ptFlicker pt
| _ptTimer pt `mod` 7 == 0 = tempLightSources
.:~ tlsTimeRadColPos 1 70 (V3 0.5 0 0) (addZ 10 $ _ptPos pt)
.:~ tlsTimeRadColPos 1 70 (0.5 *.*.* xyzV4 (_ptColor pt)) (addZ 10 $ _ptPos pt)
| otherwise = id