コード例 #1
0
ファイル: Box.cs プロジェクト: Paramecium13/Nez
        public override bool CollidesWithShape(Shape other, out CollisionResult result)
        {
            // special, high-performance cases. otherwise we fall back to Polygon.
            if (IsUnrotated && other is Box && (other as Box).IsUnrotated)
            {
                return(ShapeCollisions.BoxToBox(this, other as Box, out result));
            }

            // TODO: get Minkowski working for circle to box
            //if( other is Circle )

            // fallthrough to standard cases
            return(base.CollidesWithShape(other, out result));
        }