Ejemplo n.º 1
0
        private static void ObsManager_SceneChanged(object sender, string sceneName)
        {
            DateTime startTime = DateTime.Now;

            StopExistingAnimation();

            List <VideoAnimationBinding> bindings = AllVideoBindings.GetAll(sceneName);

            if (bindings != null)
            {
                StartLiveAnimation(sceneName, bindings, startTime);
            }

            if (sceneName == STR_AnimationEditor)
            {
                animationEditorTimer.Start();
            }
            else
            {
                HubtasticBaseStation.PreloadImageBack(null, 0, 0, 0);
                HubtasticBaseStation.PreloadImageFront(null, 0, 0, 0);
                HubtasticBaseStation.ShowImageFront(null);
                HubtasticBaseStation.ShowImageBack(null);
            }

            ChangeLightsBasedOnScene(sceneName);
        }
Ejemplo n.º 2
0
        void PreloadAroundActiveFrame(int extraFramesCount)
        {
            if (backFiles == null)
            {
                return;
            }
            int startFrame = Math.Max(0, frameIndex - extraFramesCount);
            int lastIndex  = backFiles.Length - 1;
            int endFrame   = Math.Min(lastIndex, frameIndex + extraFramesCount);

            HubtasticBaseStation.PreloadImageBack(relativePathBack, startFrame, endFrame, digitCount);
            HubtasticBaseStation.PreloadImageFront(relativePathFront, startFrame, endFrame, digitCount);
        }