healthbar #22

Merged
s464869 merged 8 commits from healthbar into master 2022-04-28 14:16:16 +02:00
2 changed files with 3 additions and 3 deletions
Showing only changes of commit 62e78ce885 - Show all commits

View File

@ -58,7 +58,7 @@ class Grid:
else: else:
self.free_fields.append(field) self.free_fields.append(field)
self.grid[row].append(pygame.sprite.Group(field)) self.grid[row].append(pygame.sprite.GroupSingle(field))
def update(self, screen): def update(self, screen):
self.draw(screen) self.draw(screen)
@ -68,7 +68,7 @@ class Grid:
return self.textures[texture_index] return self.textures[texture_index]
def get_tile(self, row, column): def get_tile(self, row, column):
return pygame.sprite.Group.sprites(self.grid[row][column])[0] # iteruj kolumny i wiersze od 0 return self.grid[row][column].sprite # iteruj kolumny i wiersze od 0
def put_on_tile(self, row, column, obj): # iteruj kolumny i wiersze od 0 def put_on_tile(self, row, column, obj): # iteruj kolumny i wiersze od 0
try: try: