A component that will handle the playing of songs when paired with an InventoryDisplay.
More...
|
| virtual void | SetupInventorySoundPlayer () |
| | Setups the inventory sound player.
|
| virtual void | PlaySound (string soundFx) |
| | Plays the sound specified in the parameter string.
|
| virtual void | PlaySound (AudioClip soundFx, float volume) |
| | Plays the sound fx specified in parameters at the desired volume.
|
| virtual void | OnMMEvent (MMInventoryEvent inventoryEvent) |
| | Catches MMInventoryEvents and acts on them, playing the corresponding sounds.
|
| void | OnMMEvent (T eventType) |
|
| Modes | Mode = Modes.Direct |
| AudioClip | OpenFx |
| | the audioclip to play when the inventory opens
|
| AudioClip | CloseFx |
| | the audioclip to play when the inventory closes
|
| AudioClip | SelectionChangeFx |
| | the audioclip to play when moving from one slot to another
|
| AudioClip | ClickFX |
| | the audioclip to play when moving from one slot to another
|
| AudioClip | MoveFX |
| | the audioclip to play when moving an object successfully
|
| AudioClip | ErrorFx |
| | the audioclip to play when an error occurs (selecting an empty slot, etc)
|
| AudioClip | UseFx |
| | the audioclip to play when an item is used, if no other sound has been defined for it
|
| AudioClip | DropFx |
| | the audioclip to play when an item is dropped, if no other sound has been defined for it
|
| AudioClip | EquipFx |
| | the audioclip to play when an item is equipped, if no other sound has been defined for it
|
|
| virtual void | Start () |
| | On Start we setup our player and grab a few references for future use.
|
| virtual void | AddAudioSource () |
| | Adds an audio source component if needed.
|
| virtual void | OnEnable () |
| | OnEnable, we start listening to MMInventoryEvents.
|
| virtual void | OnDisable () |
| | OnDisable, we stop listening to MMInventoryEvents.
|
A component that will handle the playing of songs when paired with an InventoryDisplay.
◆ Modes
◆ AddAudioSource()
| virtual void MoreMountains.InventoryEngine.InventorySoundPlayer.AddAudioSource |
( |
| ) |
|
|
protectedvirtual |
Adds an audio source component if needed.
◆ OnDisable()
| virtual void MoreMountains.InventoryEngine.InventorySoundPlayer.OnDisable |
( |
| ) |
|
|
protectedvirtual |
OnDisable, we stop listening to MMInventoryEvents.
◆ OnEnable()
| virtual void MoreMountains.InventoryEngine.InventorySoundPlayer.OnEnable |
( |
| ) |
|
|
protectedvirtual |
OnEnable, we start listening to MMInventoryEvents.
◆ OnMMEvent()
| virtual void MoreMountains.InventoryEngine.InventorySoundPlayer.OnMMEvent |
( |
MMInventoryEvent | inventoryEvent | ) |
|
|
virtual |
Catches MMInventoryEvents and acts on them, playing the corresponding sounds.
- Parameters
-
◆ PlaySound() [1/2]
| virtual void MoreMountains.InventoryEngine.InventorySoundPlayer.PlaySound |
( |
AudioClip | soundFx, |
|
|
float | volume ) |
|
virtual |
Plays the sound fx specified in parameters at the desired volume.
- Parameters
-
| soundFx | Sound fx. |
| volume | Volume. |
◆ PlaySound() [2/2]
| virtual void MoreMountains.InventoryEngine.InventorySoundPlayer.PlaySound |
( |
string | soundFx | ) |
|
|
virtual |
Plays the sound specified in the parameter string.
- Parameters
-
◆ SetupInventorySoundPlayer()
| virtual void MoreMountains.InventoryEngine.InventorySoundPlayer.SetupInventorySoundPlayer |
( |
| ) |
|
|
virtual |
Setups the inventory sound player.
◆ Start()
| virtual void MoreMountains.InventoryEngine.InventorySoundPlayer.Start |
( |
| ) |
|
|
protectedvirtual |
On Start we setup our player and grab a few references for future use.
◆ _audioSource
| AudioSource MoreMountains.InventoryEngine.InventorySoundPlayer._audioSource |
|
protected |
◆ _targetInventoryName
| string MoreMountains.InventoryEngine.InventorySoundPlayer._targetInventoryName |
|
protected |
◆ _targetPlayerID
| string MoreMountains.InventoryEngine.InventorySoundPlayer._targetPlayerID |
|
protected |
◆ ClickFX
| AudioClip MoreMountains.InventoryEngine.InventorySoundPlayer.ClickFX |
the audioclip to play when moving from one slot to another
◆ CloseFx
| AudioClip MoreMountains.InventoryEngine.InventorySoundPlayer.CloseFx |
the audioclip to play when the inventory closes
◆ DropFx
| AudioClip MoreMountains.InventoryEngine.InventorySoundPlayer.DropFx |
the audioclip to play when an item is dropped, if no other sound has been defined for it
◆ EquipFx
| AudioClip MoreMountains.InventoryEngine.InventorySoundPlayer.EquipFx |
the audioclip to play when an item is equipped, if no other sound has been defined for it
◆ ErrorFx
| AudioClip MoreMountains.InventoryEngine.InventorySoundPlayer.ErrorFx |
the audioclip to play when an error occurs (selecting an empty slot, etc)
◆ Mode
the mode to choose to play sounds. Direct will play an audiosource, event will call a MMSfxEvent, meant to be caught by a MMSoundManager
◆ MoveFX
| AudioClip MoreMountains.InventoryEngine.InventorySoundPlayer.MoveFX |
the audioclip to play when moving an object successfully
◆ OpenFx
| AudioClip MoreMountains.InventoryEngine.InventorySoundPlayer.OpenFx |
the audioclip to play when the inventory opens
◆ SelectionChangeFx
| AudioClip MoreMountains.InventoryEngine.InventorySoundPlayer.SelectionChangeFx |
the audioclip to play when moving from one slot to another
◆ UseFx
| AudioClip MoreMountains.InventoryEngine.InventorySoundPlayer.UseFx |
the audioclip to play when an item is used, if no other sound has been defined for it
The documentation for this class was generated from the following file: