public bool Equals(TransformSnapshot transformSnapshot) { if (ReferenceEquals(transformSnapshot, null)) { return(false); } if (ReferenceEquals(transformSnapshot, this)) { return(true); } return(IsEqual(transformSnapshot)); }
private bool IsEqual(TransformSnapshot transformSnapshot) { return(transformSnapshot._worldSpacePosition == _worldSpacePosition && transformSnapshot._worldSpaceRotation == _worldSpaceRotation && transformSnapshot._worldSpaceScale == _worldSpaceScale); }
public void TakeSnapshot(Camera camera) { _transformSnapshot = new TransformSnapshot(); _transformSnapshot.TakeSnapshot(camera.transform); _cameraType = camera.orthographic ? CameraType.Orthographic : CameraType.Perspective; }