Pygame | Почему не работает?

В чем проблема? Я писал через Pydroid на андроид. Только начинаю программировать Фото ошибки

class Player(pygame.sprite.Sprite):
    def __init__(self):
        pygame.sprite.Sprite.__init__(self)
        self.image = player_img
    self.image.set_colorkey(BLACK)
        self.rect = self.image.get_rect()
        self.rect.center = (WIDTH / 2, HEIGHT / 2)

Ответы (1 шт):

Автор решения: Neodor 21

Неправильный отступ.

class Player(pygame.sprite.Sprite):
        def __init__(self):
            pygame.sprite.Sprite.__init__(self)
            self.image = player_img
            self.image.set_colorkey(BLACK)
            self.rect = self.image.get_rect()
            self.rect.center = (WIDTH / 2, HEIGHT / 2)

Помните, что в python очень большую роль играют отступи.

→ Ссылка