xnapunk.colliders.RectangleCollider.GetRight C# (CSharp) Method

GetRight() public method

public GetRight ( ) : float
return float
        public float GetRight()
        {
            return (float)(Entity.Position.X + Offset.X + Size.X);
        }

Usage Example

Beispiel #1
0
        private static bool CollideRectRect(RectangleCollider a, RectangleCollider b)
        {
            if (a.GetBottom() < b.GetTop())
                return false;

            if (a.GetTop() > b.GetBottom())
                return false;

            if (a.GetRight() < b.GetLeft())
                return false;

            if (a.GetLeft() > b.GetRight())
                return false;

            return true;
        }