Exemplo n.º 1
0
    private void OnTriggerEnter2D(Collider2D collision)
    {
        Attacker attacker = collision.gameObject.GetComponent <Attacker>();

        if (attacker)
        {
            livesDisplay.DecLives(livesPerEnemyPassed);
            attacker.GetComponent <Health>().DestroyRoutine();
        }
    }