private void UpdateAmbientShow(int newShow) { if (prevAmbientShow == newShow) { return; } StopShowBuilder(); StartShowBuilder(); dreamScene.LoadScene(newShow); prevAmbientShow = newShow; }
private void StartShowBuilder() { if (_showBuilderStarted) { StopShowBuilder(); } _dreamScene.LoadScene(_ambientShow); _showBuilderSource = new CancellationTokenSource(); Task.Run(() => _dreamScene.BuildColors(this, _showBuilderSource.Token)); _prevAmbientShow = _ambientShow; _showBuilderStarted = true; }