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); }
public static bool IndicesOutsideWindow(IPositionable iPositionable) { return(IndicesOutsideWindow( iPositionable.GetPosX(), iPositionable.GetPosY())); }