Table of Contents

Class SFX_Player

Namespace
DefaultNamespace
Assembly
Assembly-CSharp.dll
public class SFX_Player : MonoBehaviour
Inheritance
SFX_Player
Inherited Members
Extension Methods

Constructors

SFX_Player()

public SFX_Player()

Fields

availibleSources

public List<SFX_Player.SFX_Source> availibleSources

Field Value

List<SFX_Player.SFX_Source>

boostGroup

public AudioMixerGroup boostGroup

Field Value

AudioMixerGroup

defaultCurve

public AnimationCurve defaultCurve

Field Value

AnimationCurve

defaultSource

public GameObject defaultSource

Field Value

GameObject

instance

public static SFX_Player instance

Field Value

SFX_Player

nrOfSoundsPlayed

public int nrOfSoundsPlayed

Field Value

int

playNoiseAction

public Action<Vector3, float, int> playNoiseAction

Field Value

Action<Vector3, float, int>

soundBoosters

public List<SoundBooster> soundBoosters

Field Value

List<SoundBooster>

sources

public Dictionary<SFX_Instance, List<SFX_Player.SFX_Source>> sources

Field Value

Dictionary<SFX_Instance, List<SFX_Player.SFX_Source>>

warmupClip

[SerializeField]
public AudioClip warmupClip

Field Value

AudioClip

Methods

CreateNewSource()

public SFX_Player.SFX_Source CreateNewSource()

Returns

SFX_Player.SFX_Source

GetAvailibleSource()

public SFX_Player.SFX_Source GetAvailibleSource()

Returns

SFX_Player.SFX_Source

GetBoostValue(Vector3)

public static float GetBoostValue(Vector3 position)

Parameters

position Vector3

Returns

float

GetBoostValue(Vector3, out float)

public static float GetBoostValue(Vector3 position, out float distance)

Parameters

position Vector3
distance float

Returns

float

IPlaySFX(SFX_Source, SFX_Instance, Vector3, Transform, SFX_Settings, float, bool)

public IEnumerator IPlaySFX(SFX_Player.SFX_Source source, SFX_Instance SFX, Vector3 position, Transform followTransform, SFX_Settings overrideSettings, float volumeMultiplier, bool local)

Parameters

source SFX_Player.SFX_Source
SFX SFX_Instance
position Vector3
followTransform Transform
overrideSettings SFX_Settings
volumeMultiplier float
local bool

Returns

IEnumerator

PlayNoise(Vector3, float, int)

public void PlayNoise(Vector3 position, float distance = 15, int alerts = 1)

Parameters

position Vector3
distance float
alerts int

PlaySFX(SFX_Instance, Vector3, Transform, SFX_Settings, float, bool, bool, bool, float, int)

public void PlaySFX(SFX_Instance SFX, Vector3 position, Transform followTransform = null, SFX_Settings overrideSettings = null, float volumeMultiplier = 1, bool loop = false, bool local = false, bool isNoise = true, float stepNoiseMultiplier = 0, int alerts = 0)

Parameters

SFX SFX_Instance
position Vector3
followTransform Transform
overrideSettings SFX_Settings
volumeMultiplier float
loop bool
local bool
isNoise bool
stepNoiseMultiplier float
alerts int

RemoveSource(SFX_Source, SFX_Instance)

public void RemoveSource(SFX_Player.SFX_Source source, SFX_Instance sfx)

Parameters

source SFX_Player.SFX_Source
sfx SFX_Instance

Start()

public void Start()