Пример #1
0
    /// <summary>
    /// Starts the speaking sound.
    /// </summary>
    /// <param name="speaker">0 - low<para/>1 - medium<para/>2 - high;</param>
    /// <param name="s">The dialogue that is being spoken</param>
    public static void StartVoice(int speaker, string s)
    {
        StopVoice();

        if (instance != null)
        {
            instance.voiceRoutine = instance.StartCoroutine(instance.VoiceRoutine(speaker, s));
        }
        else
        {
            Debug.LogError("There is no Voices prefab in the scene!");
        }
    }