only shoot one haskelloid at at time
This commit is contained in:
parent
9539d8df46
commit
3a1d7e990a
1 changed files with 3 additions and 2 deletions
|
@ -378,7 +378,8 @@ shotsUpd sec part@Particle{..} = do
|
||||||
Just _ -> return $ Just h
|
Just _ -> return $ Just h
|
||||||
Nothing -> return Nothing
|
Nothing -> return Nothing
|
||||||
) (haskelloids ud)
|
) (haskelloids ud)
|
||||||
killings <- mapM haskelloidShotDown inters
|
when (not $ null inters) $
|
||||||
|
haskelloidShotDown $ head inters
|
||||||
lost <- liftIO $ gegl_rectangle_intersect
|
lost <- liftIO $ gegl_rectangle_intersect
|
||||||
(GeglRectangle (floor nnx) (floor nny) 4 4)
|
(GeglRectangle (floor nnx) (floor nny) 4 4)
|
||||||
(GeglRectangle
|
(GeglRectangle
|
||||||
|
@ -392,7 +393,7 @@ shotsUpd sec part@Particle{..} = do
|
||||||
) lost
|
) lost
|
||||||
return part
|
return part
|
||||||
{ particlePosition = (nnx, nny)
|
{ particlePosition = (nnx, nny)
|
||||||
, particleTimeToLive = if (not $ null killings) then 0 else particleTimeToLive
|
, particleTimeToLive = if (not $ null inters) then 0 else particleTimeToLive
|
||||||
}
|
}
|
||||||
|
|
||||||
haskelloidShotDown :: Haskelloid -> Affection UserData ()
|
haskelloidShotDown :: Haskelloid -> Affection UserData ()
|
||||||
|
|
Loading…
Reference in a new issue