protected bool CheckCameraBounds(Vector3 finalPos) { var bl = _screen.GetCorner(CameraPoint.BottonLeft, _cameraDistance - _bounds.size.z / 2); var tr = _screen.GetCorner(CameraPoint.TopRight, _cameraDistance - _bounds.size.z / 2); return(finalPos.x + _bounds.size.x / 2 + BorderOffset > tr.x || finalPos.x - _bounds.size.x / 2 - BorderOffset < bl.x); }
protected bool CheckCameraBounds(Vector3 finalPos) { var bl = _screen.GetCorner(CameraPoint.BottonLeft, _cameraDistance); var tr = _screen.GetCorner(CameraPoint.TopRight, _cameraDistance); return( finalPos.x < tr.x && finalPos.x > bl.x && finalPos.y < tr.y && finalPos.y > bl.y ); }