コード例 #1
0
    public void ToggleSpeechBubble(SpeechBubble.SPEECHBUBBLETYPE _type, bool _state)
    {
        //Toggles the visibility of a speech bubble.
        bool _found = false;

        for (int i = 0; i < m_speechBubbles.Count; i++)
        {
            if (m_speechBubbles[i].m_type == _type)
            {
                m_speechBubbles[i].m_speechBubble.SetActive(_state);
                _found = true;
            }
        }

        if (!_found)
        {
            Debug.Log("ERROR: DialogueManager.ToggleSpeechBubble(" + _type.ToString() + ", " + _state + ") can't find speech bubble of that type in m_speechBubbles.");
        }
    }
コード例 #2
0
    public SpeechBubble GetSpeechBubble(SpeechBubble.SPEECHBUBBLETYPE _type)
    {
        //Get one of the Speech Bubbles by type.
        for (int i = 0; i < m_speechBubbles.Count; i++)
        {
            if (m_speechBubbles[i].m_type == _type)
            {
                return(m_speechBubbles[i]);
            }
        }

        Debug.Log("ERROR: DialogueManager.GetSpeechBubble can't find Speech Bubble of type \"" + _type.ToString() + "\".");
        return(null);
    }