Exemplo n.º 1
0
    private void FixedUpdate()
    {
        if (PoolBallsContainer.PoolBallHashSet.Count > 0)
        {
            foreach (Ball ball in PoolBallsContainer.PoolBallHashSet)
            {
                if (ball == null)
                {
                    break;
                }

                if (!ball.IsInHole && IsColliding(ball) && _customCollider.IsInsideColliderBounds(ball.transform.position))
                {
                    ball.transform.position = CorrectedPosition(ball);
                    Impact(ball, _friction);
                }
            }
        }
    }