[Haskell-cafe] Improving event management in elerea
kkwweett at yahoo.fr
Fri Aug 14 14:26:41 EDT 2009
> to the frame time, so you can adjust the speed to be
> independent of it.
> integralClamped v0 vmin vmax s = transfer v0 accum s
> where accum dt v v0 = max vmin $ min vmax $
> v0+v*realToFrac dt
> playerX <- integralClamped playerX0 (-fieldW)
> (ifte lpress
> (-1) 0 + ifte rpress 1 0)
I haven't quite understood yet so I'll see later but I already have another question :
what if the functions are some signal functions . For instance, instead of being
(subtract 1) :: a -> a,
it is a signal
func :: Signal (a ->a) ?
Is there also a simple way to compose func with an (x :: Signal a) in order to produce a new signal ?
I naively tried
y=func <*> x
but the influence of func doesn't seem to exceed a frame.
More information about the Haskell-Cafe