-
-
Save alexson/fe0041394f25d537698839bc54dba484 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void CheckOverlapping() | |
{ | |
Collider[] colliders = Physics.OverlapSphere(bombRoot.transform.position, detectionRadius); | |
foreach (Collider nearbyObject in colliders) | |
{ | |
if (nearbyObject.CompareTag("Player")) | |
{ | |
//Debug.Log("nearbyObject.tag: " + nearbyObject.name); | |
PlayerBehaviour pB = nearbyObject.GetComponentInParent<PlayerBehaviour>(); | |
pB.bombNearby = true; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment