Example #1
0
 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
Example #2
0
 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)
Example #3
0
 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()
Example #4
0
 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)
Example #7
0
 def __init__(self, nm, carry=False):
     entity.__init__(self, nm)
     __cam_carry = carry
Example #8
0
 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
Example #9
0
 def __init__(self, name):
     entity.__init__(self, name)
Example #10
0
	def __init__(self, path):
		entity.__init__(self, path)
		self.size = getsize(path)
Example #11
0
 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
Example #12
0
 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