diff --git a/Tools/DialogueSystem/DialogueManager.cs b/Tools/DialogueSystem/DialogueManager.cs index 60c4bfb..4b025a9 100644 --- a/Tools/DialogueSystem/DialogueManager.cs +++ b/Tools/DialogueSystem/DialogueManager.cs @@ -28,12 +28,11 @@ namespace SimpleTools.DialogueSystem { } public bool Dialogue(Dialogue dialogue) { - return Dialogue(dialogue, ""); + return Dialogue(dialogue, string.Empty); } public bool Dialogue(Dialogue dialogue, params string[] sounds) { - if (sounds != null) - dialogueVertexAnimator.SetAudioSourceGroup(sounds); + dialogueVertexAnimator.SetAudioSourceGroup(sounds); if (!talking) { sentences.Clear(); diff --git a/Tools/DialogueSystem/DialogueVertexAnimator.cs b/Tools/DialogueSystem/DialogueVertexAnimator.cs index e43ba41..bb20fc1 100644 --- a/Tools/DialogueSystem/DialogueVertexAnimator.cs +++ b/Tools/DialogueSystem/DialogueVertexAnimator.cs @@ -216,7 +216,7 @@ namespace SimpleTools.DialogueSystem { if (Time.unscaledTime - lastDialogueSound > timeUntilNextDialogueSound) { timeUntilNextDialogueSound = UnityEngine.Random.Range(0.02f, 0.08f); lastDialogueSound = Time.unscaledTime; - if (audioSourceGroup != null) + if (audioSourceGroup[0] != string.Empty) AudioManager.AudioManager.instance.PlayRandomSound(audioSourceGroup); } } diff --git a/package.json b/package.json index a25b86f..e8cfdfd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "com.geri.simpletools", - "version": "1.2.0", + "version": "1.2.1", "displayName": "Simple Tools", "description": "This package contains simple tools to use in your project.", "unity": "2018.4",