Add frame clock

This commit is contained in:
2021-09-09 13:29:09 +01:00
parent a2288110ae
commit be7b2d2cd7
27 changed files with 176 additions and 87 deletions
+3 -3
View File
@@ -171,7 +171,7 @@ swarmUsingCenter
-> World
-> Creature
-> Creature
swarmUsingCenter updT upd w cr = case _crTarget cr of
swarmUsingCenter updT upd w cr = case _targetCr $ _crIntention cr of
Nothing -> upd cenp cr
Just tcr -> updT tcr cenp cr
where
@@ -184,7 +184,7 @@ flockChaseTarget
-> World
-> Creature
-> Creature
flockChaseTarget updT upd w cr = case _crTarget cr of
flockChaseTarget updT upd w cr = case _targetCr $ _crIntention cr of
Nothing -> upd crs cr
Just tcr -> updT tcr crs cr
where
@@ -210,7 +210,7 @@ flockToPointUsing
-> (Point2 -> Creature -> Creature -> [Impulse])
-> Creature
-> Reader World Creature
flockToPointUsing pf mvf cr = reader $ \w -> case _crTarget cr of
flockToPointUsing pf mvf cr = reader $ \w -> case _targetCr $ _crIntention cr of
Nothing -> cr
Just tcr -> cr & crActionPlan . crImpulse .~ mvf ptarg cr tcr
where