本文整理汇总了Python中View.View.ship_list方法的典型用法代码示例。如果您正苦于以下问题:Python View.ship_list方法的具体用法?Python View.ship_list怎么用?Python View.ship_list使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类View.View
的用法示例。
在下文中一共展示了View.ship_list方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: range
# 需要导入模块: from View import View [as 别名]
# 或者: from View.View import ship_list [as 别名]
botControllers.append(run_bot_func(ship))
for i in range(0, NUM_WALLS):
x = random.randint(player_ship.location[0], 3200-player_ship.location[0])
y = random.randint(player_ship.location[1], 1800-player_ship.location[1])
w = random.randint(100, 200)
h = random.randint(100, 200)
logic.wall_list.append(pygame.Rect(x, y, w, h))
logic.wall_list.append(pygame.Rect(0, 0, map_dimensions[0], 25))
logic.wall_list.append(pygame.Rect(0, 0, 25, map_dimensions[1]))
logic.wall_list.append(pygame.Rect(0, map_dimensions[1]-25, map_dimensions[0], 25))
logic.wall_list.append(pygame.Rect(map_dimensions[0]-25, 0, 25, map_dimensions[1]))
view.wall_list = logic.wall_list
view.bullet_list = logic.bullet_list
view.ship_list = logic.ship_list
clock = pygame.time.Clock()
while 1:
clock.tick(60)
for event in pygame.event.get():
if event.type == QUIT:
exit()
logic.doLogic()
read_input(controller.move_ship, controller.turn_left, controller.turn_right, controller.shoot, controller.shield_on)
for bot in botControllers:
bot()
view.set_camera_loc(player_ship.location)
view.draw_everything()