private void OnTriggerEnter(Collider other) { if (other == target.GetComponent <Collider>()) { Vector3 direction = other.transform.position - transform.position; target.Explode(direction, force); Destroy(gameObject); } }
private void OnTriggerEnter(Collider other) { BombInteractable bi = other.gameObject.GetComponent <BombInteractable>(); if (bi != null && bi.type != InteractableType.GROUND) { if (bi.GetComponent <Player>() != Owner) { Explode(); } } }