Mod Helpers  v5.9.6
A centralized collection of library code, helpful services, and end-user functions for mod management and information.
HamstarHelpers.Helpers.Audio.SoundHelpers Class Reference

Assorted static "helper" functions pertaining to sounds. More...

Inheritance diagram for HamstarHelpers.Helpers.Audio.SoundHelpers:
HamstarHelpers.Classes.Loadable.ILoadable

Static Public Member Functions

static void PlaySound (Mod mod, string soundPath, Vector2 position, float volume=1f)
 A more flexible variant of Main.PlaySound to allow adjusting volume and position, in particular for currently-playing sounds. More...
 
static void PlaySound (string name, LegacySoundStyle sound, Vector2 position, float volume=1f)
 A more flexible variant of Main.PlaySound to allow adjusting volume and position. More...
 

Static Public Attributes

static float Volume
 Gets volume and pan data for a sound that would play at a given point. More...
 

Additional Inherited Members

Detailed Description

Assorted static "helper" functions pertaining to sounds.

Definition at line 16 of file SoundHelpers.cs.

Member Function Documentation

◆ PlaySound() [1/2]

static void HamstarHelpers.Helpers.Audio.SoundHelpers.PlaySound ( Mod  mod,
string  soundPath,
Vector2  position,
float  volume = 1f 
)
static

A more flexible variant of Main.PlaySound to allow adjusting volume and position, in particular for currently-playing sounds.

Parameters
mod
soundPath
position
volume

Definition at line 62 of file SoundHelpers.cs.

◆ PlaySound() [2/2]

static void HamstarHelpers.Helpers.Audio.SoundHelpers.PlaySound ( string  name,
LegacySoundStyle  sound,
Vector2  position,
float  volume = 1f 
)
static

A more flexible variant of Main.PlaySound to allow adjusting volume and position.

Parameters
name
sound
position
volume

Definition at line 94 of file SoundHelpers.cs.

Member Data Documentation

◆ Volume

float HamstarHelpers.Helpers.Audio.SoundHelpers.Volume
static

Gets volume and pan data for a sound that would play at a given point.

Parameters
worldX
worldY
Returns

Definition at line 23 of file SoundHelpers.cs.


The documentation for this class was generated from the following file: