Пример #1
0
 protected virtual void Awake()
 {
     try
     {
         HelperNoteLabel.Init();
         //MidiPlayerGlobal.Init();
         audiosources = new List <AudioSource>();
     }
     catch (System.Exception ex)
     {
         MidiPlayerGlobal.ErrorDetail(ex);
     }
 }
Пример #2
0
        //public static void InitPath()
        //{
        //    if (string.IsNullOrEmpty(MPTK_PathToResources))
        //        Debug.Log("MPTK_PathToResources not defined");
        //    else
        //    {
        //        PathToSoundfonts = MPTK_PathToResources + SoundfontsDB;
        //        PathToMidiFile = MPTK_PathToResources + MidiFilesDB;
        //        PathToMidiSet = MPTK_PathToResources + FilenameMidiSet + ExtensionSoundFileDot;
        //    }
        //}

        void Awake()
        {
            HelperNoteLabel.Init();

            //Debug.Log("Awake MidiPlayerGlobal");
            if (instance != null && instance != this)
            {
                Destroy(gameObject);    // remove previous instance
            }
            else
            {
                //DontDestroyOnLoad(gameObject);
                instance = this;
                Routine.RunCoroutine(instance.InitThread(), Segment.RealtimeUpdate);
            }

            InitPath();
        }
Пример #3
0
 private MidiPlayerGlobal()
 {
     HelperNoteLabel.Init();
 }