Exemplo n.º 1
0
        void OnDrumButton(DrumType drumType)
        {
            if (isRecording)
            {
                recording.Add(new Note(DateTime.Now.Ticks - recordingStart, drumType));
            }

            players[(int)drumType]?.Play();
            animations[(int)drumType]?.Commit(this, drumType.ToString());
        }
Exemplo n.º 2
0
        private void OnDrumButton(DrumType drumType)
        {
            //players[(int)drumType]?.Play();

            foreach (DrumType i in (DrumType[])Enum.GetValues(typeof(DrumType)))
            {
                if (i != DrumType.count)
                {
                    players[(int)i]?.Stop();
                    //players[(int)i].Volume = 0.0;
                    //Debug.WriteLine((int)i);
                }
            }
            //players[(int)drumType].Volume = 1.0;
            players[(int)drumType]?.Play();
            animations[(int)drumType]?.Commit(this, drumType.ToString());
        }
Exemplo n.º 3
0
 void OnDrumButton(DrumType drumType)
 {
     players[(int)drumType]?.Play();
     animations[(int)drumType]?.Commit(this, drumType.ToString());
 }