IEnumerator repainter() { if (states == null || states.Length < 8) { states = new int[8]; } for (int i = 0; i < 8; i++) { APCManager.setNote((int)lastColumn - 1, i, 0); int nextColor = 0; if (mono.isActiveAndEnabled) { if (states[i] == 1) { nextColor = (int)availableColor; } else if (states[i] == 2) { nextColor = (int)activeColor; } } APCManager.setNote((int)column - 1, i, nextColor); yield return(null); } lastColumn = column; }
IEnumerator ClearColumn(int clmn) { for (int i = 0; i < 8; i++) { APCManager.setNote(clmn - 1, i, 0); yield return(null); } }