private void OnCollisionEnter(Collision other) { health enemy = other.gameObject.GetComponent <health>(); if (enemy) { enemy.receive_damage(damage); } target tg = other.gameObject.GetComponent <target>(); if (tg) { tg.call(); } }
private void OnCollisionEnter(Collision other) { health enemy = other.gameObject.GetComponent <health>(); if (enemy) { enemy.receive_damage(damage); } target tg = other.gameObject.GetComponent <target>(); if (tg) { tg.call(); } }