本文整理匯總了Python中View.View.draw_everything方法的典型用法代碼示例。如果您正苦於以下問題:Python View.draw_everything方法的具體用法?Python View.draw_everything怎麽用?Python View.draw_everything使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類View.View
的用法示例。
在下文中一共展示了View.draw_everything方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: range
# 需要導入模塊: from View import View [as 別名]
# 或者: from View.View import draw_everything [as 別名]
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()