Ejemplo n.º 1
0
        private void Start()
        {
            PianoKeys.GetAllKeys().ForEach(e => { shouldKeyBeOn[e] = false; });
            piano                 = GetComponent <PianoBuilder>();
            crtHolder             = new List <Coroutine>();
            _midiDeviceController = GetComponent <MidiDeviceController>();
            scoreView             = GetComponent <ScoreView>();
            noteDurations         = new List <NoteDuration>();
            foreach (var item in PianoKeys.GetAllKeys())
            {
                pianoRollDict.Add(item, new List <GameObject>());
            }
            var ws = PianoKeys.GetAllKeys().Where(e => e.color == KeyColor.White).ToList();

            for (var i = 0; i < ws.Count(); i++)
            {
                colorDict[ws[i]] = MakeColorFromHex(0xffffff);
            }
            PianoKeys.GetAllKeys().Where(e => e.color == KeyColor.Black).ToList()
            .ForEach(e => colorDict[e] = MakeColorFromHex(0x0000ff));
        }
 private void Start()
 {
     cameraHook = GetComponent <PianoBuilderMarkerHook>();
     builder    = GetComponent <PianoBuilder>();
 }
Ejemplo n.º 3
0
 private void Start()
 {
     piano           = GetComponent <PianoBuilder>();
     spawnedSegments = new List <GameObject>();
 }