示例#1
0
        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);
        }
示例#2
0
        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);
        }