예제 #1
0
    /// <summary>
    /// Called when something enters the triggerbox
    /// </summary>
    /// <param name="other">The collider that entered the triggerbox</param>
    private void OnTriggerEnter2D(Collider2D other)
    {
        if (other.tag.Equals("Player"))
        {
            if (m_gData.IsBossActive() == false)
            {
                Destroy(m_doorOne);
                Destroy(m_doorTwo);

                m_doorOpen.GetComponent <AudioSource>().Play();
                m_doorOpenTwo.GetComponent <AudioSource>().Play();

                m_doorOpen.GetComponent <SpriteRenderer>().enabled    = true;
                m_doorOpenTwo.GetComponent <SpriteRenderer>().enabled = true;

                m_gData.ActivateBoss();
            }
        }
    }