def update_cursor(self, keys):
"""Update the position of the cursor"""
input_list = [pg.K_RETURN, pg.K_a, pg.K_s]
if self.cursor.state == c.PLAYER1:
self.cursor.rect.y = 358
if keys[pg.K_DOWN]:
self.cursor.state = c.PLAYER2
for input in input_list:
if keys[input]:
self.reset_game_info()
self.done = True
elif self.cursor.state == c.PLAYER2:
self.cursor.rect.y = 403
if keys[pg.K_UP]:
self.cursor.state = c.PLAYER1
main_menu.py 文件源码
python
阅读 23
收藏 0
点赞 0
评论 0
评论列表
文章目录