Beispiel #1
0
 def __init__(self):
     """
     Creates the listeners and set its position to default (0, 0)
     """
     super()
     self._listener = FMOD.createListener()
     self.setPosition(self.getPosition())
     FMOD.setRollOffScale(0.01)
Beispiel #2
0
    fmodGeometry = FMODGeometry()
    fmodGeometry.setPosition((_object.getX(), _object.getY()))
    # inserts the element at tht beggining of the list
    gameObjects.insert(0, fmodGeometry)


# -------------------PYGAME-------------------------
screen = pygame.display.set_mode((800, 800))
clock = pygame.time.Clock()
pygame.display.set_caption("Proyecto Sonido")
pygame.font.init()
x = 0

# -------------------FMOD--------------------------
FMOD.init()
FMOD.setRollOffScale(0.1)

# -------------------RESOURCES----------------------
resourcesManager = ResourcesManager.getInstance()
resourcesManager.loadImagesFromDirectory(
    getStringCurrentWorkingDirectory() + "\\resources\\sprites")
resourcesManager.loadSoundsFromDirectory(
    getStringCurrentWorkingDirectory() + "\\resources\\sounds")

# -------------------GAME OBJECTS-------------------------
gameObjects = []
popUp = PopUpMenu(["Add Listener", "Add Source", "Add Reverb", "Add Geometry", "Remove last element"],
                  [(addFMODListener, [gameObjects, "Listener.png"]),
                   (addFMODSource, [gameObjects, "Source.png", "steps0.wav"]),
                   (addFMODReverb, [gameObjects, "Reverb.png"]),
                   (addFMODGeometry, [gameObjects]),