TO SQUASH: Fixed issue with collisions with destroyed balls.
This commit is contained in:
@@ -135,8 +135,11 @@ public class BallSpawner : MonoBehaviour
|
|||||||
// As an exception, glass balls will collide with other glass balls.
|
// As an exception, glass balls will collide with other glass balls.
|
||||||
foreach (var ball in balls)
|
foreach (var ball in balls)
|
||||||
{
|
{
|
||||||
|
if (ball == null) continue;
|
||||||
|
|
||||||
foreach (var otherBall in balls)
|
foreach (var otherBall in balls)
|
||||||
{
|
{
|
||||||
|
if (otherBall == null) continue;
|
||||||
if (ball == otherBall) continue;
|
if (ball == otherBall) continue;
|
||||||
|
|
||||||
bool ballIsBasicOrFruit = ball.CompareTag("BasicBall") || ball.CompareTag("FruitBall");
|
bool ballIsBasicOrFruit = ball.CompareTag("BasicBall") || ball.CompareTag("FruitBall");
|
||||||
|
|||||||
Reference in New Issue
Block a user