Ejemplo n.º 1
0
 def __init__(self, sprite_name, sprite_group=None):
     pygame.sprite.DirtySprite.__init__(self)
     if sprite_group is not None:
         sprite_group.add(self)
     self.image, self.rect = load_image(sprite_name, -1)
     self.name = sprite_name
     self.dirty = 1
     self.delete = False
Ejemplo n.º 2
0
SPRITE_MANAGER = LayeredDirty_Manager()
PLAYER_MANAGER = PlayerManager()
OBJECT_MANAGER = SingletonList()

PLANET_MANAGER = PlanetGroup()
BULLET_MANAGER = BulletGroup()

BULLET_GROUP_MANAGER = []

# SOUNDS
SND_IMPACT = load_sound("impact.wav")
SND_PLAYER_GOT_HIT = load_sound("3049__starpause__k9dhhpulsekick.wav")
SND_DEATH = load_sound("death.wav")

SND_THRUST = load_sound("thrust.wav")
SND_SHOOT = load_sound("shoot.wav")

# SND_BACKGROUND = load_music("com-truise-mind[mp3freex].mp3")
# SND_BACKGROUND = load_music("HOME - Odyssey - 03 Decay.mp3")
BLACK = pygame.Color('black')
GREEN = pygame.Color('green')
BLUE = pygame.Color('blue')
RED = pygame.Color('red')

SCREEN = pygame.display.set_mode(SCREEN_SIZE)

BACKGROUND, BACKGROUND_POS = load_image("big_background.jpg")

PLAYERS = [True, True]
CLOCK = Clock()
Ejemplo n.º 3
0
SPRITE_MANAGER = LayeredDirty_Manager()
PLAYER_MANAGER = PlayerManager()
OBJECT_MANAGER = SingletonList()

PLANET_MANAGER = PlanetGroup()
BULLET_MANAGER = BulletGroup()

BULLET_GROUP_MANAGER = []

# SOUNDS
SND_IMPACT = load_sound("impact.wav")
SND_PLAYER_GOT_HIT = load_sound("3049__starpause__k9dhhpulsekick.wav")
SND_DEATH = load_sound("death.wav")

SND_THRUST = load_sound("thrust.wav")
SND_SHOOT = load_sound("shoot.wav")

# SND_BACKGROUND = load_music("com-truise-mind[mp3freex].mp3")
# SND_BACKGROUND = load_music("HOME - Odyssey - 03 Decay.mp3")
BLACK = pygame.Color('black')
GREEN = pygame.Color('green')
BLUE = pygame.Color('blue')
RED = pygame.Color('red')

SCREEN = pygame.display.set_mode(SCREEN_SIZE)

BACKGROUND, BACKGROUND_POS = load_image("big_background.jpg")

PLAYERS = [True, True]
CLOCK = Clock()