コード例 #1
0
    void OnTriggerEnter2D(Collider2D other)
    {
        //If the code reaches this stage, it means the note was not touched by player, this counts as a miss
        //m_TouchPanel.MissDetected();

        Destroy(other.gameObject);
        //TODO - because the note was destroyed by the barrier, it means the player didn't touch it.
        //if the player doesn't touch it, counts as a miss
        //also increments the array value int he the touch panel.
        if (m_EnableMissDetection)
        {
            m_TouchPanel.MissDetected();
        }
    }