Ejemplo n.º 1
0
        public override void OnEnter()
        {
            CameraController cameraController = CameraController.GetInstance();

            if (waitUntilFinished)
            {
                cameraController.waiting = true;
            }

            if (fadeTexture)
            {
                cameraController.screenFadeTexture = fadeTexture;
            }
            else
            {
                cameraController.screenFadeTexture = CameraController.CreateColorTexture(fadeColor, 32, 32);
            }

            cameraController.Fade(targetAlpha, duration, delegate {
                if (waitUntilFinished)
                {
                    cameraController.waiting = false;
                    Continue();
                }
            });

            if (!waitUntilFinished)
            {
                Continue();
            }
        }
Ejemplo n.º 2
0
        public override void OnEnter()
        {
            AcquireCamera();
            if (targetCamera == null ||
                targetView == null)
            {
                Continue();
                return;
            }

            CameraController cameraController = CameraController.GetInstance();

            if (waitUntilFinished)
            {
                cameraController.waiting = true;
            }

            Vector3    targetPosition = targetView.transform.position;
            Quaternion targetRotation = targetView.transform.rotation;
            float      targetSize     = targetView.viewSize;

            cameraController.PanToPosition(targetCamera, targetPosition, targetRotation, targetSize, duration, delegate {
                if (waitUntilFinished)
                {
                    cameraController.waiting = false;
                    Continue();
                }
            });

            if (!waitUntilFinished)
            {
                Continue();
            }
        }
Ejemplo n.º 3
0
        public override void OnEnter()
        {
            if (spriteRenderer == null)
            {
                Continue();
                return;
            }

            CameraController cameraController = CameraController.GetInstance();

            if (waitUntilFinished)
            {
                cameraController.waiting = true;
            }

            SpriteFader.FadeSprite(spriteRenderer, targetColor, duration, Vector2.zero, delegate {
                if (waitUntilFinished)
                {
                    cameraController.waiting = false;
                    Continue();
                }
            });

            if (!waitUntilFinished)
            {
                Continue();
            }
        }
Ejemplo n.º 4
0
        public override void OnEnter()
        {
            CameraController cameraController = CameraController.GetInstance();

            cameraController.StopSwipePan();

            Continue();
        }
Ejemplo n.º 5
0
        protected virtual void Flash(float duration)
        {
            ICameraController cameraController = CameraController.GetInstance();

            cameraController.ScreenFadeTexture = CameraController.CreateColorTexture(new Color(1f, 1f, 1f, 1f), 32, 32);
            cameraController.Fade(1f, duration, delegate {
                cameraController.ScreenFadeTexture = CameraController.CreateColorTexture(new Color(1f, 1f, 1f, 1f), 32, 32);
                cameraController.Fade(0f, duration, null);
            });
        }
Ejemplo n.º 6
0
        public override void OnEnter()
        {
            if (targetCamera == null ||
                viewA == null ||
                viewB == null)
            {
                Continue();
                return;
            }

            CameraController cameraController = CameraController.GetInstance();

            cameraController.StartSwipePan(targetCamera, viewA, viewB, duration, speedMultiplier, () => Continue());
        }
Ejemplo n.º 7
0
        public override void OnEnter()
        {
            AcquireCamera();
            if (targetCamera == null ||
                targetView == null)
            {
                Continue();
                return;
            }

            CameraController cameraController = CameraController.GetInstance();

            if (waitUntilFinished)
            {
                cameraController.waiting = true;
            }

            if (fadeTexture)
            {
                cameraController.screenFadeTexture = fadeTexture;
            }
            else
            {
                cameraController.screenFadeTexture = CameraController.CreateColorTexture(fadeColor, 32, 32);
            }

            cameraController.FadeToView(targetCamera, targetView, duration, fadeOut, delegate {
                if (waitUntilFinished)
                {
                    cameraController.waiting = false;
                    Continue();
                }
            });

            if (!waitUntilFinished)
            {
                Continue();
            }
        }
Ejemplo n.º 8
0
        public override void OnEnter()
        {
            CameraController cameraController = CameraController.GetInstance();

            cameraController.StartSwipePan(viewA, viewB, duration, speedMultiplier, () => Continue());
        }
Ejemplo n.º 9
0
 public override void OnStopExecuting()
 {
     CameraController.GetInstance().StopAllCoroutines();
 }