tModLoader v2024.09
A mod to make and play Terraria mods
|
Static Public Member Functions | |
static ActiveSound | FindActiveSound (in SoundStyle style) |
static void | Initialize () |
static void | Load (IServiceProvider services) |
static SlotId | PlaySound (in SoundStyle style, Vector2? position=null, SoundUpdateCallback? updateCallback=null) |
Attempts to play a sound with the provided sound style, and returns a valid SlotId handle to it on success. More... | |
static SlotId | PlaySound (in SoundStyle? style, Vector2? position=null, SoundUpdateCallback? updateCallback=null) |
Attempts to play a sound style with the provided sound style (if it's not null), and returns a valid SlotId handle to it on success. More... | |
static void | Reload () |
static void | StopAmbientSounds () |
static void | StopTrackedSounds () |
static bool | TryGetActiveSound (SlotId slotId, [NotNullWhen(true)] out ActiveSound? result) |
static void | Update () |
Static Public Attributes | |
static bool | AreSoundsPaused |
static SoundPlayer | SoundPlayer |
Properties | |
static bool | IsAudioSupported [get] |
|
static |
Attempts to play a sound with the provided sound style, and returns a valid SlotId handle to it on success.
style | The sound style that describes everything about the played sound. |
position | An optional 2D position to play the sound at. When null, this sound will be heard everywhere. |
updateCallback | A callback for customizing the behavior of the created sound instance, like tying its existence to a projectile using ProjectileAudioTracker. |
|
static |
Attempts to play a sound style with the provided sound style (if it's not null), and returns a valid SlotId handle to it on success.