Пример #1
0
    void OnTriggerEnter2D(Collider2D trigger)
    {
        EnemyShot laserHit = trigger.GetComponent <EnemyShot> ();

        if (laserHit)
        {
            TakeDamage(laserHit.getDamage());
            laserHit.killMe();
        }
    }