Ejemplo n.º 1
0
        /// Destroys instrument.
        public void RemoveInstrument()
        {
            InstrumentSet set = (mMusicGenerator.mState >= eGeneratorState.editorInitializing) ? MeasureEditor.Instance.mCurrentInstSet : mMusicGenerator.mInstrumentSet;

            mMusicGenerator.RemoveInstrument((int)mInstrument.InstrumentIndex, set);
            mInstrumentListPanelUI.RemoveInstrument((int)mInstrument.InstrumentIndex);
            if (mbIsSelected)
            {
                mInstrumentPanelUI.mInstrument = null;
            }
            Destroy(this.gameObject);
        }