Home >
other > Pygame how to implement different according to the two key events at the same time?
Pygame how to implement different according to the two key events at the same time?
Designed a two players at the same time operation of the game, I want to use pygame. Key. Get_pressed () to implement the button pressed, the plane can move, but in the actual operation process, the two planes at the same time when press the button corresponding to move (a flight mobile keypad is w, s, a, d, no. 2 on the plane is, the left and right), only responded to one of the plane's mobile, excuse me how can two aircraft realize their mobile when press the button?