private void ChangeScene() { if (displayData.SceneList.Count > 0) { if (currentSceneSequenceID > displayData.SceneList.Count - 1) { currentSceneSequenceID = 0; } currentScene = displayData.SceneList[currentSceneSequenceID]; currentScene.setActive(); SceneManager.LoadScene(currentScene.sceneID); bgParticleManager.ActivateBackgroundParticle(currentScene.EffectID); currentSceneSequenceID++; //Load specific details about the scene configuration UpdateSceneTimer(); if (connectedRef2 != null) { connectedRef2.SetValueAsync(true); } if (currentSceneSequenceID > displayData.SceneList.Count - 1) { currentSceneSequenceID = 0; } } }
private void PauseLoop() { pauseLoop = true; Scene tmpscene = SceneManager.GetActiveScene(); if (tmpscene.buildIndex != displayData.lockedScene) { currentScene = new scene(); currentScene.setActive(); currentScene.sceneID = displayData.lockedScene; SceneManager.LoadScene(displayData.lockedScene); updateMatchMadness = true; } }
private void UpdateCurrentSceneData() { if (currentScene != null && displayData.SceneList != null && currentScene.sceneID != 0) { scene foundScene = displayData.SceneList.Find(s => s.promoID.Equals(currentScene.promoID)); if (foundScene != null) { if (foundScene.lastUpdated != currentScene.lastUpdated || foundScene.promotionStatus != currentScene.promotionStatus) { currentScene = foundScene; currentScene.setActive(); updateSceneDataNow = true; UpdateSceneTimer(); saveSettingsFile(); } } } }