void OnTriggerEnter2D(Collider2D collision) { if (collision.tag == "Enemy") { m_nLife--; Destroy(collision.gameObject); m_scLifebars.Down(1); if (m_nLife <= 0) { Destroy(gameObject); } } }
void OnTriggerEnter2D(Collider2D collision) { if (collision.tag == "Adventurer") { m_nLife--; Destroy(collision.gameObject); m_scLifebars.Down(1); if (m_nLife == 0) { BulletMNG.I.AllRemoveBullet(); Destroy(gameObject); } } }