les pacdots à afficher dans pacmap.py
This commit is contained in:
parent
e7b67a6545
commit
51143d9507
@ -17,7 +17,7 @@ class Screen:
|
||||
self.pacman = pacman
|
||||
self.pacman_sprite = pacman_sprite.PacmanSprite(size[0]/28)
|
||||
self.clock = pg.time.Clock()
|
||||
self.max_fps = 40
|
||||
self.max_fps = 60
|
||||
self.entity_group = pg.sprite.Group(self.pacman_sprite)
|
||||
self.loop()
|
||||
|
||||
|
@ -65,7 +65,8 @@ class Map:
|
||||
else:
|
||||
self.phys_map = phys_map # in the first part we assume phys_map is correct and no need to verify
|
||||
self.dots_map = dots_map
|
||||
self.intersect_map = [] # TODO - the layer which contains intersections pre-calculated
|
||||
# self.intersect_map = [] # TODO - the layer which contains intersections pre-calculated
|
||||
self.create_cross_layer()
|
||||
|
||||
|
||||
def verify(self, phys_map, dots_map) -> bool:
|
||||
@ -164,6 +165,7 @@ class Map:
|
||||
return self.phys_map[y][x]
|
||||
|
||||
def create_cross_layer(self):
|
||||
self.intersect_map = []
|
||||
dictionnary = {
|
||||
(0, 1):CrossTile.DOWN,
|
||||
(0, -1): CrossTile.UP,
|
||||
@ -186,8 +188,17 @@ class Map:
|
||||
|
||||
def draw(self, surf):
|
||||
surf.blit(self._surf, (0, 0))
|
||||
self._dot_surf.fill()
|
||||
|
||||
# self._dot_surf.fill(surf)
|
||||
|
||||
def _draw_dots(self, surf):
|
||||
for row in len(self.dots_map):
|
||||
for col in len(self.dots_map[0]):
|
||||
if self.phys_map[row][col] == PhysTile.GRD and self.dots_map[row][col] == DotTile.SPD:
|
||||
# petits rond
|
||||
pass
|
||||
elif self.phys_map[row][col] == PhysTile.GRD and self.dots_map[row][col] == DotTile.BPD:
|
||||
# big pac dot
|
||||
pass
|
||||
|
||||
def decode_map(self, img_file):
|
||||
img = Image.open(img_file)
|
||||
|
Reference in New Issue
Block a user