Exemplo n.º 1
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);
            });
        }
Exemplo n.º 2
0
        public override void OnEnter()
        {
            ICameraController cameraController = CameraController.GetInstance();

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

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

            if (!waitUntilFinished)
            {
                Continue();
            }
        }