def __init__(self, rend): entity.__init__(self) self.texture = sdl2.SDL_CreateTextureFromSurface( rend, IMG_Load(image_path)) self.surface = sdl2.SDL_Rect(80, 270, birdWidth, birdHeight) self.acc = 7.0 self.vel = 0.0 pass
def __init__(self, rend, inv): entity.__init__(self) if inv: self.texture = sdl2.SDL_CreateTextureFromSurface( rend, IMG_Load(pipe_path_inv)) self.surface = sdl2.SDL_Rect(pipeBaseX, -175, pipeWidth, pipeHeight) else: self.texture = sdl2.SDL_CreateTextureFromSurface( rend, IMG_Load(pipe_path)) self.surface = sdl2.SDL_Rect(pipeBaseX, 275, pipeWidth, pipeHeight)
def __init__(self, rend): entity.__init__(self) self.texture = [sdl2.SDL_CreateTextureFromSurface(rend, IMG_Load(img0)), sdl2.SDL_CreateTextureFromSurface(rend, IMG_Load(blank)), sdl2.SDL_CreateTextureFromSurface(rend, IMG_Load(blank))] self.isScore = True self.surface0 = sdl2.SDL_Rect(300, 25, 97-70, 129-80) self.surface1 = sdl2.SDL_Rect(300 - 40, 25, 97-70, 129-80) self.surface2 = sdl2.SDL_Rect(300 - (2 * 40), 25, 97-70, 129-80) self.count = 0 self.rend = rend self.update_textures()
def __init__(self): entity.__init__(self) self.event = sdl2.SDL_Event() self.type = None self.entities = None # List containing all of the scene's entities self.background = None self.floor = None self.pipe1_bot = None self.pipe1_top = None self.pipe2_bot = None self.pipe2_top = None self.player = None self.index_player = None self.score = None self.title = None self.RequestChange = False self.Pause = True pass
def __init__(self,x,y,image): entity.__init__(self,x,y,image) self.acc = 0.2 self.affectedByGravity=False self.direction = "left"
def __init__(self,x,y,image): entity.__init__(self,x,y,image)
def __init__(self, nm, carry=False): entity.__init__(self, nm) __cam_carry = carry
def __init__(self, rend): entity.__init__(self) self.texture = sdl2.SDL_CreateTextureFromSurface( rend, IMG_Load(title_img)) self.surface = sdl2.SDL_Rect(120, 50, 370, 133) self.Running = False
def __init__(self, name): entity.__init__(self, name)
def __init__(self, path): entity.__init__(self, path) self.size = getsize(path)
def __init__(self, rend): entity.__init__(self) self.texture = sdl2.SDL_CreateTextureFromSurface(rend, IMG_Load(floor_img)) self.surface = sdl2.SDL_Rect(0, 490, 1200, 150) pass
def __init__(self, rend): entity.__init__(self) self.texture = sdl2.SDL_CreateTextureFromSurface( rend, IMG_Load(background_img)) self.surface = sdl2.SDL_Rect(0, 0, 1575, 500) pass