MonoGdx.Scene2D.Group.Hit C# (CSharp) Method

Hit() public method

public Hit ( float x, float y, bool touchable ) : Actor
x float
y float
touchable bool
return Actor
        public override Actor Hit(float x, float y, bool touchable)
        {
            if (touchable && Touchable == Scene2D.Touchable.Disabled)
                return null;

            for (int i = Children.Count - 1; i >= 0; i--) {
                Actor child = Children[i];
                if (!child.IsVisible)
                    continue;

                Vector2 point = child.ParentToLocalCoordinates(new Vector2(x, y));
                Actor hit = child.Hit(point.X, point.Y, touchable);
                if (hit != null)
                    return hit;
            }

            return base.Hit(x, y, touchable);
        }