void OnTriggerEnter(Collider renwu) { if (renwu.gameObject.tag == "em" && status == fire_status.losse) { hp_handler hp = renwu.GetComponent <hp_handler> (); if (hp != null) { hp.hurt((int)(Hurt)); } destory(); } }
void OnTriggerEnter(Collider other) { if (other.gameObject.tag == "em") { if (other.gameObject != null) { monster mo = other.GetComponent <monster> (); System.Guid guid = mo.guid; if (monsters_need_hit.Contains(guid) && !hited.Contains(guid)) { hited.Add(guid); hp_handler hp = other.GetComponent <hp_handler> (); if (hp != null) { hp.hurt((int)(hurt)); } mo.hit_back((other.transform.position - transform.position).normalized); Instantiate(fire_manager.go_fireball_boom, other.gameObject.transform.position, Quaternion.Euler(0, 0, 0)); } } } }