public void SetNoteColors(Color?leftColorNullable, Color?rightColorNullable, float?duration = null) { Color leftColor = leftColorNullable ?? noteColorLeft; Color rightColor = rightColorNullable ?? noteColorRight; if (interceptingLightshow != null) { interceptingLightshow.OnInterceptedNoteColors(leftColor, rightColor, Time.time + duration ?? -1f); return; } noteColorLeft = leftColor; noteColorRight = rightColor; useCustomNoteColors = true; UpdateNoteColors( Helper.IsRainbow(leftColor)? RainbowController.instance.GetLeftColor() : leftColor, Helper.IsRainbow(rightColor) ? RainbowController.instance.GetRightColor() : rightColor ); disableNoteColorsOn = duration.HasValue ? Time.time + duration.Value : -1f; SetEnabled(); }
public void SetRestoreValues(CustomLightshowController lightshow) { if (useCustomSaberColors) { lightshow.OnInterceptedSaberColors(saberColorLeft, saberColorRight, disableSaberColorsOn); } if (useCustomNoteColors) { lightshow.OnInterceptedNoteColors(noteColorLeft, noteColorRight, disableNoteColorsOn); } if (useCustomWallColor) { lightshow.OnInterceptedWallColor(wallColor, disableWallColorOn); } }