Exemplo n.º 1
0
        private void CheckProspectiveCentroids(int colliderCastResultCount)
        {
            for (int i = 0; i < colliderCastResultCount; i++)
            {
                if (StaticUtilities.Vector2_Equal_CustomThreshold(transform.position, currentTargetCentroids[i], groundedDistanceThreshold))
                {
                    // Debug.Log("t pos: " + transform.position + " || centroidPos: " + currentTargetCentroids[i] + " || Distance: " + Vector2.Distance(transform.position, currentTargetCentroids[i]));

                    Vector2 newGroundVector = CreateNewGroundVector(i);

                    ChangeGroundVector(newGroundVector);

                    ChangeGroundedStatus(true);
                }

                else
                {
                    ChangeGroundedStatus(false);
                }
            }
        }