[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[pygame] Keyboard handling



Hey all, I'm writing a breakout clone in PyGame, and I'm trying
to implement acceleration for my paddle. I have a Paddle.Move()
function that continuously adds accel_rate to self.cur_accel, and then
moves the paddle self.cur_accel to the left or right. The problem is,
I want the cur_accel to be set back to 0 when the player lets go
of the key.. I couldn't find anything on 'key release' events, and
having a 'timeout' period for the key event seems nasty. Any suggestions?

Thanks.
--
Chris Armstrong

____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org