コード例 #1
0
    public void onDeath()
    {
        if (!isDead)
        {
            isDead = true;
            //if (m_DeathSound) m_DeathSound.Play(); Sound is too long and i would need to set a trigger once is over to delete the object.

            m_GM = FindObjectOfType <GameFlowManager>();
            m_GM.addScore(PointsByDeath, transform.position.y);
            Destroy(gameObject);
        }
    }