示例#1
0
        private void Restore(Camera camera)
        {
            var cameraState = SgtCameraState.Restore(cameraStates, camera);

            if (cameraState != null)
            {
                transform.localPosition = cameraState.LocalPosition;
            }
        }
示例#2
0
        private void CameraPreCull(Camera camera)
        {
            var cameraState = SgtCameraState.Find(ref cameraStates, camera);

            transform.localScale = MaxScale * cameraState.Value;

            // Store scale
            cameraState.LocalScale = transform.localScale;
        }
        public void Restore(Camera camera)
        {
            var cameraState = SgtCameraState.Restore(cameraStates, camera);

            if (cameraState != null)
            {
                transform.localPosition = cameraState.LocalPosition;
                transform.localRotation = cameraState.LocalRotation;
                transform.localScale    = cameraState.LocalScale;
            }
        }
示例#4
0
		private void CameraPreCull(Camera camera)
		{
			var cameraState = SgtCameraState.Find(ref cameraStates, camera);
			var eye         = camera.transform.position;
			var tgt         = transform.position;
			var occlusion   = SgtOcclusion.Calculate(layers, new Vector4(eye.x, eye.y, eye.z, 0.0f), new Vector4(tgt.x, tgt.y, tgt.z, radius));

			transform.localScale = maxScale * Mathf.Clamp01(1.0f - occlusion);

			// Store scale
			cameraState.LocalScale = transform.localScale;
		}
        public void Save(Camera camera)
        {
            var cameraState = SgtCameraState.Find(ref cameraStates, camera);

            cameraState.LocalPosition = transform.localPosition;
        }
        private void Save(Camera camera)
        {
            var cameraState = SgtCameraState.Find(ref cameraStates, camera);

            cameraState.LocalRotation = transform.localRotation;
        }
        private void Save(Camera camera)
        {
            var cameraState = SgtCameraState.Save(ref cameraStates, camera);

            cameraState.LocalScale = transform.localScale;
        }
        public void Save(Camera camera)
        {
            var cameraState = SgtCameraState.Save(ref cameraStates, camera);

            cameraState.LocalRotation = transform.localRotation;
        }
示例#9
0
        private void Save(Camera camera)
        {
            var cameraState = SgtCameraState.Save(ref cameraStates, camera);

            cameraState.LocalPosition = transform.position;
        }