private static void Postfix(NoteController noteController) { NoteData noteData = noteController.noteData; Color color = TechnicolorController.GetTechnicolor(noteData.colorType == ColorType.ColorA, noteData.time + noteController.GetInstanceID(), TechnicolorConfig.Instance.TechnicolorBlocksStyle); noteController.ColorizeNote(color); }
private static void Postfix(NoteController __instance, NoteData ____noteData, NoteMovement ____noteMovement) { ChromaObjectData?chromaData = TryGetObjectData <ChromaObjectData>(____noteData); if (chromaData == null) { return; } Track? track = chromaData.Track; PointDefinition?pathPointDefinition = chromaData.LocalPathColor; if (track != null || pathPointDefinition != null) { NoteJump noteJump = _noteJumpAccessor(ref ____noteMovement); float jumpDuration = _jumpDurationAccessor(ref noteJump); float elapsedTime = _audioTimeSyncControllerAccessor(ref noteJump).songTime - (____noteData.time - (jumpDuration * 0.5f)); float normalTime = elapsedTime / jumpDuration; Chroma.AnimationHelper.GetColorOffset(pathPointDefinition, track, normalTime, out Color? colorOffset); if (colorOffset.HasValue) { Color color = colorOffset.Value; if (__instance is BombNoteController) { __instance.ColorizeBomb(color); } else { __instance.ColorizeNote(color); } } } }