void OnTriggerEnter2D (Collider2D other)
{
if (other.gameObject.CompareTag (“laserRay”))
Destroy (gameObject);
}
// AND…
void OnTriggerEnter2D (Collider2D co)
{
if (co.name == "laserRay")
Destroy (gameObject);
}, void OnTriggerEnter2D (Collider2D other)
{
if (other.gameObject.CompareTag ("laserRay")) {
Destroy (gameObject);
}
}
et…
void OnTriggerEnter2D (Collider2D co)
{
if (co.name == "laserRay")
Destroy (gameObject);
}
,