/// Loads a new configuration. private IEnumerator NonAsyncLoadNewConfiguration(string configName) { yield return(StartCoroutine(NonAsyncLoadConfig(configName))); NonAsyncLoadUI(); mGlobalEffectsPanel.Init(mMusicGenerator); mMusicGenerator.SetState(eGeneratorState.ready); yield return(null); }
public void Init() { mMusicGenerator.SetState(eGeneratorState.initializing); mMusicGenerator.mMusicFileConfig.LoadConfig(mMusicGenerator.mDefaultConfig, eGeneratorState.ready); mTooltips = Tooltips.Instance; mTooltips.Init(); mStaffPlayer = StaffPlayerUI.Instance; mInstrumentListPanelUI = InstrumentListPanelUI.Instance; mMeasureEditor = MeasureEditor.Instance; mMeasureEditor.Init(mMusicGenerator); mInstrumentPanelUI = InstrumentPanelUI.Instance; mInstrumentPanelUI.Init(); mAdvancedSettingsPanel = AdvancedSettingsPanel.Instance; mAdvancedSettingsPanel.Init(); mGlobalEffectsPanel = GlobalEffectsPanel.Instance; mGlobalEffectsPanel.Init(mMusicGenerator); mGeneratorUIPanel = MusicGeneratorUIPanel.Instance; mGeneratorUIPanel.Init(mMusicGenerator); mStaffPlayer.Init(mMusicGenerator); mStaffPlayer.ChangeTimeSignature(-1); //mInstrumentListPanelUI.Init(mMusicGenerator); }
public IEnumerator Init() { mMusicGenerator.SetState(eGeneratorState.initializing); yield return(StartCoroutine(mMusicGenerator.mMusicFileConfig.LoadConfig(mMusicGenerator.mDefaultConfig, eGeneratorState.initializing))); mTooltips = Tooltips.Instance; yield return(StartCoroutine(mTooltips.Init())); mStaffPlayer = StaffPlayerUI.Instance; mInstrumentListPanelUI = InstrumentListPanelUI.Instance; mMeasureEditor = MeasureEditor.Instance; mMeasureEditor.Init(mMusicGenerator); mInstrumentPanelUI = InstrumentPanelUI.Instance; mInstrumentPanelUI.Init(); mAdvancedSettingsPanel = AdvancedSettingsPanel.Instance; mAdvancedSettingsPanel.Init(); mGlobalEffectsPanel = GlobalEffectsPanel.Instance; mGlobalEffectsPanel.Init(mMusicGenerator); mGeneratorUIPanel = MusicGeneratorUIPanel.Instance; bool finished = false; yield return(StartCoroutine(mGeneratorUIPanel.Init(mMusicGenerator, (x) => { finished = x; }))); yield return(new WaitUntil(() => finished)); mStaffPlayer.Init(mMusicGenerator); mStaffPlayer.ChangeTimeSignature(-1); mMusicGenerator.SetState(eGeneratorState.ready); //mInstrumentListPanelUI.Init(mMusicGenerator); yield return(null); }