Ejemplo n.º 1
0
 private void OnTriggerEnter(Collider other)
 {
     if (other == target.GetComponent <Collider>())
     {
         Vector3 direction = other.transform.position - transform.position;
         target.Explode(direction, force);
         Destroy(gameObject);
     }
 }
Ejemplo n.º 2
0
    private void OnTriggerEnter(Collider other)
    {
        BombInteractable bi = other.gameObject.GetComponent <BombInteractable>();

        if (bi != null && bi.type != InteractableType.GROUND)
        {
            if (bi.GetComponent <Player>() != Owner)
            {
                Explode();
            }
        }
    }