Refactor sound

This commit is contained in:
2021-09-12 17:52:34 +01:00
parent ea333a363b
commit 51a85bd1ec
97 changed files with 409 additions and 177 deletions
+3 -3
View File
@@ -4,7 +4,7 @@ import Dodge.Data
import Dodge.Data.SoundOrigin
import Dodge.Default.Weapon
import Dodge.Default.Shell
import Dodge.SoundLogic.Synonyms
import Dodge.SoundLogic.LoadSound
import Dodge.WorldEvent.Explosion
import Dodge.Picture.Layer
import Dodge.Item.Data
@@ -43,7 +43,7 @@ launcher = defaultGun
, _itUseModifiers =
[ ammoCheckI
, useTimeCheckI
, withSoundI launcherSound
, withSoundI tap4S
, useAmmo 1
]
, _wpSpread = 0.02
@@ -107,7 +107,7 @@ doThrust :: Projectile -> World -> World
doThrust pj w = w
& randGen .~ g
& projectiles . ix i . pjVel %~ (\v -> accel +.+ frict *.* v)
& soundFrom (ShellSound i) newPos smokeTrailSound (Just 1)
& soundFrom (ShellSound i) newPos missileLaunchS (Just 1)
& makeFlameletTimed (oldPos -.- vel) 0 (vel +.+ rotateV (pi+sparkD) accel) Nothing 3 10
& smokeGen
where