|
|
楼主 |
发表于 2022-8-13 15:34:20
|
显示全部楼层
# 获取鼠标坐标
mouse_position = pygame.mouse.get_pos()
if storage_rect.collidepoint(mouse_position)and len(ball_list) < 4:
ball_list.append(ball)
ball = spaceship.new_ball()
else:
#把炮台中的能量球发射出去
spaceship.fire_ball(ball,mouse_position)
#产生一颗新的能量球放到炮台里
ball = spaceship.new_ball() |
|