Add infinite rectangles, make scene move when player gets near the screen's edge
This commit is contained in:
@@ -66,9 +66,11 @@ bool SDLPP::Rect::colidesWith(const SDLPP::CollisionPolygon &other) const {
|
||||
if(other.isCircle()) {
|
||||
return other.colidesWith(*this);
|
||||
}
|
||||
if(other.isInfinite()) {
|
||||
if(other.isInfinite() ) {
|
||||
return infinityIntersection(other, *this);
|
||||
}
|
||||
if(isInfinite())
|
||||
return infinityIntersection(*this, other);
|
||||
return intersects(*this, other);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user