My problem:
So I am programing a game right now and I am at the start of it. So I just wanted to draw a sprite on my screen which is called in an other Filer but I always get the error that the line 13 repeated 491 times more.
This is the code:
import pygame
class Start(pygame.sprite.Sprite):
def __init__(self,surface):
super().__init__()
self.display_surface = surface
self.image = pygame.image.load("Pygame-Graphics/Start.png").convert_alpha()
self.rect = self.image.get_rect(topleft = (500,400))
self.start = pygame.sprite.GroupSingle()
self_sprite = Start(self.rect)
self.start.add(self_sprite)
def draw(self):
self.start.update()
self.start.draw(self.display_surface)
So i except, that when i call the function draw
from an other file that my sprite is being drawn on my screen.