diff --git a/src/Physics/Classes/Collidible.hs b/src/Physics/Classes/Collidible.hs index 6193fef..9dbc76c 100644 --- a/src/Physics/Classes/Collidible.hs +++ b/src/Physics/Classes/Collidible.hs @@ -49,7 +49,7 @@ class (Show c, Mass c) => Collidible c where collisionOccured :: c -> Bool -- | Update the collision occurence flag - updateCollisionOccurence :: c -> (Bool -> c) + updateCollisionOccurence :: c -> Bool -> c -- | returns the bottom left and top right corners relative to the objects -- positional vector of the axis aligned bounding box (AABB) serving here diff --git a/src/Scenes/Test/Update.hs b/src/Scenes/Test/Update.hs index 63965e5..0dc219a 100644 --- a/src/Scenes/Test/Update.hs +++ b/src/Scenes/Test/Update.hs @@ -58,7 +58,7 @@ update level dt = liftIO $ do let partners = V.foldl (\jacc (qInd, tangible2) -> - let res = collisionCheck dt tangible1 tangible2 + let res = collisionCheck tangible1 tangible2 in case res of c@(OverlapCollision _) -> @@ -98,7 +98,7 @@ update level dt = liftIO $ do d dt in - resetImpactForces $ resetCollisionOccurence $ + resetImpactForces $ flip updateCollisionOccurence False $ if collisionOccured inter then addLoads inter (impactForces inter) else addLoads inter constG