Quantcast
Channel: Forum Pasja Informatyki - Najnowsze pytania bez odpowiedzi
Viewing all articles
Browse latest Browse all 21942

problem ze zdarzeniami - pygame

$
0
0

Witam.

mam taki kod:

        for event in pg.event.get():
            if event.type == pg.KEYDOWN:
                if event.key == pg.K_a:
                    self.rot_speed = -PLAYER_ROT_SPEED
                    self.vel = vec(PLAYER_SPEED, 0).rotate(-self.rot)
                if event.key == pg.K_d:
                    self.rot_speed = PLAYER_ROT_SPEED
                    self.vel = vec(PLAYER_SPEED, 0).rotate(-self.rot)

Problem w tym, że ten kod się nie wykonuje!

Pętla w którym znajduje się ten bloczek wykonuje się na pewno, sprawdzałem wpisując obok tego bloczka "print("cokolwiek")", natomiast po umieszczeniu polecenia w "if event.key == klawisz:" nic się nie wypisuje.

Pomocy!


Viewing all articles
Browse latest Browse all 21942

Trending Articles


TRX Antek AVT - 2310 ver 2,0


Автовишка HAULOTTE HA 16 SPX


POTANIACZ


Zrób Sam - rocznik 1985 [PDF] [PL]


Maxgear opinie


BMW E61 2.5d błąd 43E2 - klapa gasząca a DPF


Eveline ➤ Matowe pomadki Velvet Matt Lipstick 500, 506, 5007


Auta / Cars (2006) PLDUB.BRRip.480p.XviD.AC3-LTN / DUBBING PL


Peugeot 508 problem z elektroniką


AŚ Jelenia Góra