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

GetBottom() public method

public GetBottom ( ) : float
return float
        public float GetBottom()
        {
            return (float)(Entity.Position.Y + Offset.Y + Size.Y);
        }

Usage Example

コード例 #1
0
ファイル: Collider.cs プロジェクト: Gnoll/XNAPunk
        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;
        }