Вот участок кода :
Синтаксис:
Используется javascript
function OnTriggerStay (other : Collider) {
if (other.tag == "Collecter") {
animation.Play("hoveranim");
yield WaitForSeconds(3);
Destroy(gameObject);
}
if (other.tag == "Defender") {
animation.Play("hoveranim");
yield WaitForSeconds(3);
Destroy(gameObject);
}
}
if (other.tag == "Collecter") {
animation.Play("hoveranim");
yield WaitForSeconds(3);
Destroy(gameObject);
}
if (other.tag == "Defender") {
animation.Play("hoveranim");
yield WaitForSeconds(3);
Destroy(gameObject);
}
}
Мне нужно получить тег обьекта, которому принадлежит коллайдер.