Example #1
0
 private void OnFadeInEnded(OnFadingInEndedEvent info)
 {
     Entities.ForEach((Entity e, ref CameraFadeParameters cameraFade) =>
     {
         EntityManager.RemoveComponent <CameraFadeIn>(e);
         CameraFadeSystem.ResetParameters(ref cameraFade);
     });
 }
        private void OnFadeOutEnded(OnFadingOutEndedEvent info)
        {
            Entities.ForEach((Entity e, ref CameraFadeParameters cameraFade) =>
            {
                EntityManager.RemoveComponent <CameraFadeOut>(e);

                var overrideSpeed = cameraFade.FadingSpeed;

                CameraFadeSystem.ResetParameters(ref cameraFade);

                if (cameraFade.ShouldImmediatlyFadeIn)
                {
                    new StartFadingInEvent(overrideSpeed);
                }

                cameraFade.ShouldImmediatlyFadeIn = false;
            });
        }