Beispiel #1
0
	def __init__(self, x, y):
		Entity.__init__(self, x, y, "explosion.png", -1, "coordExplosion.txt", [25])
		self.rect.centerx = x + 2
		self.rect.bottom = y + 12

		sound = load_sound("explosion.wav")
		sound.set_volume(0.25)
		sound.play()
Beispiel #2
0
    def __init__(self, x, y):
        Entity.__init__(self, x, y, "explosion.png", -1, "coordExplosion.txt",
                        [25])
        self.rect.centerx = x + 2
        self.rect.bottom = y + 12

        sound = load_sound("explosion.wav")
        sound.set_volume(0.25)
        sound.play()
Beispiel #3
0
 def __init__(self, x, y, imageName=None, colorkey=None, coordsName=None, numImages=None, sound = None, soundVolume = 1, *args):
     Entity.__init__(self, x, y, imageName, colorkey, coordsName, numImages)
     self.active = False
     self.posIndex = POS_UP
     self.posImageIndex = 0  
     
     if sound:
         self.sound = load_sound(sound)
         self.sound.set_volume(soundVolume)
     else:
         self.sound = None   
Beispiel #4
0
	def __init__(self, imageName=None, colorkey=None, clipRect=None, sound=None, soundVolume=1, *args):
		Entity.__init__(self, 0, 0, imageName, colorkey)

		if clipRect:
			self.rect = Rect(0, 0, clipRect.w, clipRect.h)
			self.sheetCoord = [[clipRect]]

		if sound:
			self.sound = load_sound(sound)
			self.sound.set_volume(soundVolume)
		else:
			self.sound = None

		self.melee = False
Beispiel #5
0
    def __init__(self,
                 imageName=None,
                 colorkey=None,
                 clipRect=None,
                 sound=None,
                 soundVolume=1,
                 *args):
        Entity.__init__(self, 0, 0, imageName, colorkey)

        if clipRect:
            self.rect = Rect(0, 0, clipRect.w, clipRect.h)
            self.sheetCoord = [[clipRect]]

        if sound:
            self.sound = load_sound(sound)
            self.sound.set_volume(soundVolume)
        else:
            self.sound = None

        self.melee = False
Beispiel #6
0
    def __init__(self,
                 x,
                 y,
                 imageName=None,
                 colorkey=None,
                 coordsName=None,
                 numImages=None,
                 sound=None,
                 soundVolume=1,
                 *args):
        Entity.__init__(self, x, y, imageName, colorkey, coordsName, numImages)
        self.active = False
        self.posIndex = POS_UP
        self.posImageIndex = 0

        if sound:
            self.sound = load_sound(sound)
            self.sound.set_volume(soundVolume)
        else:
            self.sound = None