Exemplo n.º 1
0
    public void triggerAnimatedText(string animation_trigger, string output_text, Sprite output_sprite)
    {
        //reset the dismiss bool in case it was previously used to close the element
        m_animator.SetBool("dismiss", false);

        //set the values of the output elements
        m_text.text = output_text;

        if (output_sprite != null)
        {
            m_image.color  = Color.white;
            m_image.sprite = output_sprite;
        }
        else
        {
            m_image.color = Color.clear;
        }

        //animate in
        m_animator.SetTrigger(animation_trigger);

        if (m_ui_manager == null)
        {
            m_ui_manager = UI_Manager.GetInstance();
        }
    }