Exemple #1
0
    private void OnTriggerEnter2D(Collider2D otherCollider)
    {
        GameObject otherObject = otherCollider.gameObject;

        if (otherObject.GetComponent <Attacker>())
        {
            healthDisplay.EnemyReachesBase();
            Destroy(otherObject);
        }
    }