public bool CollisionWithOtherPositinables(IPositionable iOtherObject) { if (iOtherObject == this) { return(false); } if (Algorithm.IndicesOutsideWindow(this)) { return(false); } if (iOtherObject.GetPosX() >= GetPosX() + GetSize() || iOtherObject.GetPosX() + iOtherObject.GetSize() <= GetPosX() || iOtherObject.GetPosY() >= GetPosY() + GetSize() || iOtherObject.GetPosY() + iOtherObject.GetSize() <= GetPosY()) { return(false); } return(true); }