Improve bee pheremones
This commit is contained in:
+4
-8
@@ -316,8 +316,8 @@ functionalUpdate =
|
||||
(updateIMl' (_linearShockwaves . _lWorld . _cWorld) updateLinearShockwave)
|
||||
. over uvWorld (updateIMl' (_projectiles . _lWorld . _cWorld) updateProjectile)
|
||||
. over uvWorld updateClouds
|
||||
. over uvWorld updateBeePheremones
|
||||
. over uvWorld updateGasses
|
||||
. over uvWorld (updateObjMapMaybe beePheremones updateBeePheremone)
|
||||
. over uvWorld (updateObjCatMaybes gasses updateGas)
|
||||
. over uvWorld updateDusts
|
||||
. over uvWorld updateGusts
|
||||
. over uvWorld (updateIMl' (_terminals . _lWorld . _cWorld) updateTerminal)
|
||||
@@ -780,17 +780,13 @@ updateSparks = updateObjCatMaybes sparks updateSpark
|
||||
updateClouds :: World -> World
|
||||
updateClouds w = updateObjMapMaybe clouds (updateCloud w) w
|
||||
|
||||
updateBeePheremones :: World -> World
|
||||
updateBeePheremones w = updateObjMapMaybe beePheremones updateBeePheremone w
|
||||
|
||||
updateBeePheremone :: BeePheremone -> Maybe BeePheremone
|
||||
updateBeePheremone bp
|
||||
| x <- bp ^. bpTimer
|
||||
, x <= 0 = Nothing
|
||||
| otherwise = Just $ bp & bpTimer -~ 1
|
||||
|
||||
updateGasses :: World -> World
|
||||
updateGasses = updateObjCatMaybes gasses updateGas
|
||||
& bpVel *~ 0.95
|
||||
& bpPos +~ (bp ^. bpVel)
|
||||
|
||||
updateDusts :: World -> World
|
||||
updateDusts w = updateObjMapMaybe dusts (updateDust w) w
|
||||
|
||||
Reference in New Issue
Block a user