[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] move problems



On Thu, Apr 9, 2009 at 2:48 PM, Yanom Mobis <yanom@xxxxxxxxxxxxxx> wrote:
if key[K_RIGHT]:
        spaceship.speed=(spaceship.speed[0]+10, spaceship.speed[1])
        print("K_RIGHT") #debug
    if key[K_RIGHT]:
        spaceship.speed=(spaceship.speed[0]-10, spaceship.speed[1])
        print("K_LEFT") #debug
if key[K_RIGHT]:
    move right
if key[K_RIGHT]:
    move left

Two K_RIGHT ?
That should cancel any speed changes out...