Browse Source

Maybe fixed one player game

master
klonfish 7 years ago committed by klonfish
parent
commit
b0efc71e22
  1. 19
      gamemenu.py

19
gamemenu.py

@ -367,18 +367,17 @@ if __name__ == '__main__':
p2_frame = create_2player_screen(dim) p2_frame = create_2player_screen(dim)
out.sendFrame(p2_frame) out.sendFrame(p2_frame)
wait_time = 3 wait_time = 2
start = time.time() start = time.time()
while time.time() < start+wait_time: while time.time() < start+wait_time:
while True: evt = inp2.get_event()
evt = inp2.get_event() if inp2.player_present:
if inp2.player_present: inp1.running = False
inp1.running = False inp2.running = False
inp2.running = False start_game(game, 2)
start_game(game, 2) elif evt == InputEvent.QUIT:
elif evt == InputEvent.QUIT: sys.exit()
sys.exit() time.sleep(0.1)
time.sleep(0.1)
inp1.running = False inp1.running = False
inp2.running = False inp2.running = False

Loading…
Cancel
Save