public bool IsOut() { var pos = transform.position; var size = GetComponent <Collider2D>().bounds.size; return(BorderDetector.IsOut(pos, size)); }
public bool IsCollised() { var pos = transform.position; var size = GetComponent <Collider2D>().bounds.size; var isCol = BorderDetector.IsCollised(pos, size); IsCollisedDebug = isCol; IsOutDebug = BorderDetector.IsOut(pos, size); posDebug = pos; sizeDebug = size; topRightDebug = BorderDetector.RightTop; leftBottomDebug = BorderDetector.LeftBottom; return(isCol); }