예제 #1
0
        public bool Equals(TransformSnapshot transformSnapshot)
        {
            if (ReferenceEquals(transformSnapshot, null))
            {
                return(false);
            }
            if (ReferenceEquals(transformSnapshot, this))
            {
                return(true);
            }

            return(IsEqual(transformSnapshot));
        }
예제 #2
0
 private bool IsEqual(TransformSnapshot transformSnapshot)
 {
     return(transformSnapshot._worldSpacePosition == _worldSpacePosition &&
            transformSnapshot._worldSpaceRotation == _worldSpaceRotation &&
            transformSnapshot._worldSpaceScale == _worldSpaceScale);
 }
예제 #3
0
 public void TakeSnapshot(Camera camera)
 {
     _transformSnapshot = new TransformSnapshot();
     _transformSnapshot.TakeSnapshot(camera.transform);
     _cameraType = camera.orthographic ? CameraType.Orthographic : CameraType.Perspective;
 }