static void Postfix()
        {
#if DEBUG
            Plugin.Log.Info("AudioTimeSyncController.Pause/Resume()");
#endif
            CamManager.ApplyCameraValues(worldCam: true);
        }
Пример #2
0
        public static void OnActiveSceneChanged(Scene oldScene, Scene newScene)
        {
            if (newScene == null)
            {
                return;
            }

            currentScene = newScene;
            isInSong     = newScene.name == "GameCore";
            isInMenu     = !isInSong && menuSceneNames.Contains(newScene.name);

            if (oldScene.name == "GameCore")
            {
#if DEBUG
                Plugin.Log.Info("oldScene = GameCore, resetting stuffs in SceneUtil");
#endif

                ScoresaberUtil.isInReplay = false;
                HookLeveldata.Reset();
                audioTimeSyncController = null;
            }

            ScenesManager.ActiveSceneChanged();

            // Updating the bitmask on scene change to allow for things like the auto wall toggle
            CamManager.ApplyCameraValues(bitMask: true, worldCam: true, posRot: true);
        }
Пример #3
0
        public static void SongStarted(AudioTimeSyncController controller)
        {
            audioTimeSyncController = controller;
            ScoresaberUtil.UpdateIsInReplay();

            TransparentWalls.MakeWallsOpaqueForMainCam();
            CamManager.ApplyCameraValues(worldCam: true);

            if (CamManager.cams.Values.Any(x => !x.settings.visibleObjects.Floor))
            {
                // Move the plattform stuff to the correct layer because beat games didnt
                foreach (var x in (new string[] { "Construction", "Frame", "RectangleFakeGlow" }).Select(x => GameObject.Find($"Environment/PlayersPlace/{x}")))
                {
                    if (x != null)
                    {
                        x.layer = (int)VisibilityLayers.PlayerPlattform;
                    }
                }
            }
        }