NotQuiteParadise2

Audio

class Audio(game: Game)[source]

Bases: object

The Audio Engine. It manages all sound interactions

__init__(game: Game)[source]
play_sound(sound_name: str, loops: int = 0, max_time: float = - 1, fade_in_ms: float = - 1, allow_duplicates: bool = True)[source]

Play sound.

Parameters
  • sound_name – the name of the sound

  • loops – how many loops. set to INFINITE to make the sound loop infinitely. Can still be stopped.

  • max_time – how long the sound can play for. -1 means until end.

  • fade_in_ms – how long the sound will take to get to full volume. -1 means start at full.

  • allow_duplicates – when the same sound can be played while this is still active.

update(delta_time: float)[source]