Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Molosnic Dumitru committed Sep 8, 2017
2 parents 99426d0 + 40e2c6f commit acceec7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
14 changes: 7 additions & 7 deletions AudioController/Assets/OSSC/Example/UIControlsForOSSCExample.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ public class UIControlsForOSSCExample : MonoBehaviour
{
public SoundController soundController;

SoundCueProxy coins;
SoundCueProxy whosh;
SoundCueProxy crackingIce;
SoundCueProxy sfxCue;
SoundCueProxy sfxCueLoop;
SoundCueProxy music;
SoundCueProxy musicWithTag;
ISoundCue coins;
ISoundCue whosh;
ISoundCue crackingIce;
ISoundCue sfxCue;
ISoundCue sfxCueLoop;
ISoundCue music;
ISoundCue musicWithTag;

public void PlayCoins()
{
Expand Down
8 changes: 4 additions & 4 deletions AudioController/Assets/OSSC/Source/SoundController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ public void SetMute(string categoryName, bool value)
/// Creates a SoundCue and plays it.
/// </summary>
/// <param name="settings">A struct which contains all data for SoundController to work</param>
/// <returns>A soundCue proxy which can be subscribed to it's events.</returns>
public SoundCueProxy Play(PlaySoundSettings settings)
/// <returns>A soundCue interface which can be subscribed to it's events.</returns>
public ISoundCue Play(PlaySoundSettings settings)
{
if (settings.soundCueProxy != null)
{
Expand Down Expand Up @@ -188,7 +188,7 @@ public SoundCueProxy Play(PlaySoundSettings settings)
#region Private methods
private SoundCueProxy PlaySoundCue(PlaySoundSettings settings)
{
SoundCueProxy cue = settings.soundCueProxy;
SoundCueProxy cue = settings.soundCueProxy as SoundCueProxy;
Transform parent = settings.parent;
float fadeInTime = settings.fadeInTime;
float fadeOutTime = settings.fadeOutTime;
Expand Down Expand Up @@ -290,7 +290,7 @@ public struct PlaySoundSettings
public float fadeOutTime;
public string categoryName;
public bool isLooped;
public SoundCueProxy soundCueProxy;
public ISoundCue soundCueProxy;
public string tagName;

public void Init()
Expand Down
1 change: 1 addition & 0 deletions AudioController/Assets/OSSC/Source/SoundCue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ public SoundCue(int id)
public void Play(SoundCueData data)
{
_data = data;
AudioObject.isDespawnOnFinishedPlaying = !data.isLooped;
AudioObject.OnFinishedPlaying = OnFinishedPlaying_handler;
// audioObject.isDespawnOnFinishedPlaying = false;
if (TryPlayNext() == false)
Expand Down

0 comments on commit acceec7

Please sign in to comment.