- class arcade.AStarBarrierList(moving_sprite: Sprite, blocking_sprites: SpriteList, grid_size: int, left: int, right: int, bottom: int, top: int)#
Class that manages a list of barriers that can be encountered during A* path finding.
moving_sprite (Sprite) – Sprite that will be moving
blocking_sprites (SpriteList) – Sprites that can block movement
grid_size (int) – Size of the grid, in pixels
left (int) – Left border of playing field
right (int) – Right border of playing field
bottom (int) – Bottom of playing field
top (int) – Top of playing field
Recalculate blocking sprites.
- arcade.has_line_of_sight(point_1: Tuple[float, float], point_2: Tuple[float, float], walls: SpriteList, max_distance: int = -1, check_resolution: int = 2) bool #
Determine if we have line of sight between two points. Try to make sure that spatial hashing is enabled on the wall SpriteList or this will be very slow.