Add bee pheremones
This commit is contained in:
@@ -316,6 +316,7 @@ functionalUpdate =
|
||||
(updateIMl' (_linearShockwaves . _lWorld . _cWorld) updateLinearShockwave)
|
||||
. over uvWorld (updateIMl' (_projectiles . _lWorld . _cWorld) updateProjectile)
|
||||
. over uvWorld updateClouds
|
||||
. over uvWorld updateBeePheremones
|
||||
. over uvWorld updateGasses
|
||||
. over uvWorld updateDusts
|
||||
. over uvWorld updateGusts
|
||||
@@ -779,6 +780,15 @@ 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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user