updated example. works fine

This commit is contained in:
nek0 2016-12-20 04:16:31 +01:00
parent 954c70b31b
commit fc67e752ed

View file

@ -109,7 +109,7 @@ update sec = do
vx <- liftIO $ randomRIO (-20, 20) vx <- liftIO $ randomRIO (-20, 20)
vy <- liftIO $ randomRIO (-20, 20) vy <- liftIO $ randomRIO (-20, 20)
life <- liftIO $ randomRIO (1, 5) life <- liftIO $ randomRIO (1, 5)
traceM $ "velocity is: " ++ show vx ++ " " ++ show vy -- traceM $ "velocity is: " ++ show vx ++ " " ++ show vy
putAffection $ ud putAffection $ ud
{ coordinates = Just (fromIntegral x, fromIntegral y) { coordinates = Just (fromIntegral x, fromIntegral y)
, partsys = (partsys ud) , partsys = (partsys ud)
@ -118,6 +118,7 @@ update sec = do
, particlePosition = (fromIntegral x, fromIntegral y) , particlePosition = (fromIntegral x, fromIntegral y)
, particleRotation = 0 , particleRotation = 0
, particleVelocity = (vx, vy) , particleVelocity = (vx, vy)
, particlePitchRate = 0
}) : (psParts $ partsys ud) }) : (psParts $ partsys ud)
} }
} }