[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] Character Movement
Cool, thanks for that. I'll try that a little later on, but right now as long as it works, it's OK. I'm going to rewrite it all later anyway...
On 4/26/07,
Jason Massey <jason.massey@xxxxxxxxx> wrote:
A more readable alternative to chaining together all the or's:
if event.key in [K_e,K_i,K_KP8]:
player.xmove -=3
On 4/26/07, Charles Christie
<sonicbhoc@xxxxxxxxx> wrote:
It worked!
...but I confused x and y. o_O
On 4/26/07, Charles Christie <
sonicbhoc@xxxxxxxxx> wrote:
oooooooooooooooooooooooh. Lemme try that...
On 4/26/07, Aaron Maupin <maupin@xxxxxxxxxxxxxx
> wrote:
Just scanning your code,
Charles Christie wrote:
> if
event.key == K_e or K_i or K_KP8:
> player.xmove = -3
should probably be:
if event.key == K_e or event.key == K_i or event.key == K_KP8:
player.xmove = -3
etc.