Пример #1
0
        void Start()
        {
            Assert.IsTrue(NoteColours.GetNumber() == keys.Length && keys.Length == tones.Length,
                          "Keys must of the same length, and correspond to NoteColours.");

            SetupAudio();

            SetupState();

            SetupPauseMenu();
        }
Пример #2
0
 void SetupAudio()
 {
     m_instrumentSource = instrumentSourceObject.GetComponent <IInstrumentSource>();
     m_playingVoices    = new int[NoteColours.GetNumber()];
     m_playingColours   = new List <ENoteColour>();
     m_pressedColours   = new List <ENoteColour>();
     for (int i = 0; i < m_playingVoices.Length; ++i)
     {
         m_playingVoices[i] = -1;
     }
     // Force a number of voices
     // Two might yield better results than only one (hopefully).
     if (m_instrumentSource.NumberVoices < 2)
     {
         m_instrumentSource.NumberVoices = 2;
     }
 }