Example #1
0
    def __init__(self):
        image = pygame.image.load("images/player/player1.gif")
        MovingObject.__init__(self, 25, 25, 5, image, 0, 0)
        self.imageCode = 1

        self.live = 5
        self.point = 0
        self.level = 1

        self.rect.x = self.screenwidth / 2
        self.rect.y = self.screenheight - 100

        self.counterMax = 9
        self.counter = self.counterMax

        self.rebornCounterMax = 150
        self.rebornCounter = 0

        self.fireSound = pygame.mixer.Sound("sounds/fire.ogg")
        self.activeStuff = pygame.mixer.Sound("sounds/activeStuff.ogg")
        self.mushroomSound = pygame.mixer.Sound("sounds/mushroom.ogg")
        self.liveReduce = pygame.mixer.Sound("sounds/liveReduce.ogg")
        self.levelPassing = pygame.mixer.Sound("sounds/levelPassing.ogg")

        self.isReborn = True
Example #2
0
 def __init__(self, screen, size, pos=None, vel=Coord(0, 0)):
     if pos == None:
         pos = Coord(size.x / 2, size.y / 2)
     MovingObject.__init__(self, screen, size, pos, vel)
     self.angle = 0
     self.r = 20
     self.bulletcooldown = 0
     self.dead = False
Example #3
0
    def __init__(self):
        image = pygame.image.load("images/ghost/ghost1.gif")
        #x = self.screenwidth - 25
        #y = random.randint(0, self.screenheight / (25 * 2) - 1) * 25
        MovingObject.__init__(self, 25, 25, 5, image, 0, 0)

        self.rect.x = self.screenwidth - 25
        self.rect.y = random.randint(0, self.screenheight / (25 * 2) - 1) * 25

        self.imageCode = 1

        self.directionX = -1
Example #4
0
    def __init__(self, x, y, image, angle, directionX, directionY):
        image = pygame.transform.rotate(
            pygame.image.load("images/centipede/centipede" + image + ".gif"),
            angle)
        MovingObject.__init__(self, 23, 23, 5, image, x, y)

        self.totalAngle = angle
        self.directionX = directionX
        self.directionY = directionY
        self.curveCounter = 0
        self.feet = CentipedeFeet(self.rect.x, self.rect.y)
        self.feetPosition = random.randint(1, 3)
        self.updateFeetPosition()
 def __init__(self, x, y):
     image = pygame.image.load("images/centipede/centipedeFeet.gif")
     MovingObject.__init__(self, 3, 25, 0, image, x, y)
Example #6
0
 def __init__(self, screen, size, r, pos=Coord(0, 0), vel=Coord(0, 0)):
     MovingObject.__init__(self, screen, size, pos, vel)
     self.r = r
     self.speed = 0.15
     self.dead = False
Example #7
0
 def __init__(self, screen, size, pos , vel):
     MovingObject.__init__(self, screen, size, pos, vel)
     self.r = 5
     self.dead = False
    def __init__(self):
        image = pygame.image.load("images/mushroomer.gif")
        MovingObject.__init__(self, 25, 25, 5, image, 0, 25)

        self.rect.x = random.randint(0, self.screenwidth / 25 - 1) * 25