// Update is called once per frame void Update() { if (Globals.applicationMode == Globals.ApplicationMode.Playing && !GameSettings.bot) { ChartEditor editor = ChartEditor.Instance; GamepadInput input = editor.inputManager.mainGamepad; Chart.GameMode gameMode = editor.currentChart.gameMode; LaneInfo laneInfo = editor.laneInfo; if (gameMode == Chart.GameMode.Drums) { foreach (Note.DrumPad drumPad in System.Enum.GetValues(typeof(Note.DrumPad))) { if (bannedDrumPadInputs.ContainsKey(drumPad)) { continue; } if (input.GetPadInputControllerOrKeyboard(drumPad, laneInfo)) { animations[(int)drumPad].Press(); } else { animations[(int)drumPad].Release(); } } } else { foreach (Note.GuitarFret fret in System.Enum.GetValues(typeof(Note.GuitarFret))) { if (bannedFretInputs.ContainsKey(fret)) { continue; } if (input.GetFretInputControllerOrKeyboard(fret)) { animations[(int)fret].Press(); } else { animations[(int)fret].Release(); } } } } else { for (int i = 0; i < animations.Length; ++i) { if (!animations[i].running) { animations[i].Release(); } } } }