Exemplo n.º 1
0
        void OnTriggerExit2D(Collider2D other)
        {
            NoteId nid = other.gameObject.GetComponent <NoteId>();

            if (nid == null)
            {
                return;
            }

            if (nid.info.isActive)
            {
                nid.TurnOff();
            }
        }
Exemplo n.º 2
0
        void OnTriggerEnter2D(Collider2D other)
        {
            NoteId nid = other.gameObject.GetComponent <NoteId>();

            if (nid == null)
            {
                return;
            }

            if (!nid.info.isActive)
            {
                return;
            }

            nid.Play();
        }