private RenderComponent findTile(GridIndex gridIndex)
        {
            GridIndex renderIndex;

            foreach (RenderComponent renderComponent in renderers[2].renderComponents)
            {
                renderIndex = IsometricUtilities.findGridID(isometricGrid.to2D(0), renderComponent.renderRect);

                if (gridIndex.X == renderIndex.X && gridIndex.Y == renderIndex.Y)
                {
                    Console.WriteLine(true);


                    return(renderComponent);
                }
            }

            return(null);
        }
        private GridIndex calculateTile(Rectangle rectangle)
        {
            GridIndex tileIndex;

            foreach (ColliderComponent collider in colliders)
            {
                foreach (Rectangle colliderRect in collider.Colliders)
                {
                    if (rectangle.IntersectsWith(colliderRect))
                    {
                        tileIndex = IsometricUtilities.findGridID(playerGrid, collider);

                        return(tileIndex);
                    }
                }
            }

            Console.WriteLine(false);

            return(null);
        }