Commit before introducing layers to pictures

This commit is contained in:
jgk
2021-02-23 22:18:35 +01:00
parent b9cba33b81
commit a853c2d946
5 changed files with 33 additions and 60 deletions
-16
View File
@@ -102,22 +102,6 @@ loadSounds = do
, foamSpray'
]
-- updateSound :: World -> IO World
-- updateSound w
-- = do forM_ (_soundQueue w) (\n -> Mix.playOn (-1) 0 (_loadedSounds w IM.! n))
-- fmap (set soundQueue creatureSounds) $ stepSoundTimers $ w
-- -- = return $ set soundQueue creatureSounds w
-- -- = do forM_ (_soundQueue w) (\n -> Mix.playOn (-1) (_loadedSounds w IM.! n) 0)
-- -- fmap (set soundQueue creatureSounds) $ return w
-- where creatureSounds = []
--playSounds :: a -> World -> IO ()
--playSounds _ w = do
-- forM_ (_soundQueue w) (\n -> Mix.playOn (-1) 0 (_loadedSounds w IM.! n))
-- -- = return $ set soundQueue creatureSounds w
-- -- = do forM_ (_soundQueue w) (\n -> Mix.playOn (-1) (_loadedSounds w IM.! n) 0)
-- -- fmap (set soundQueue creatureSounds) $ return w
-- where creatureSounds = []
soundOnce :: Int -> World -> World
soundOnce i = over soundQueue ((:) i)
+3 -2
View File
@@ -714,8 +714,9 @@ aTeslaArc cid w = aTeslaArc' cid
$ soundFrom (CrWeaponSound cid) 25 1 0 w
aTeslaArc' :: Int -> World -> World
aTeslaArc' cid w = over particles (IM.insert i (makeTeslaArcAt i pos dir))
$ flareAt' cyan 0.03 0.1 (pos +.+ 5 *.* unitVectorAtAngle dir)
aTeslaArc' cid w =
flareAt' cyan 0.03 0.1 (pos +.+ 5 *.* unitVectorAtAngle dir)
$ over particles (IM.insert i (makeTeslaArcAt i pos dir))
$ set randGen g w
where cr = (_creatures w IM.! cid)
i = newParticleKey w