示例#1
0
        public void SetSaberColors(Color?leftColorNullable, Color?rightColorNullable, float?duration = null)
        {
            Color leftColor  = leftColorNullable ?? saberColorLeft;
            Color rightColor = rightColorNullable ?? saberColorRight;

            if (interceptingLightshow != null)
            {
                interceptingLightshow.OnInterceptedSaberColors(leftColor, rightColor, Time.time + duration ?? -1f);

                return;
            }

            saberColorLeft  = leftColor;
            saberColorRight = rightColor;

            useCustomSaberColors = true;

            UpdateSaberColors(
                Helper.IsRainbow(leftColor) ? RainbowController.instance.GetLeftColor() : leftColor,
                Helper.IsRainbow(rightColor) ? RainbowController.instance.GetRightColor() : rightColor
                );

            disableSaberColorsOn = duration.HasValue ? Time.time + duration.Value : -1f;

            SetEnabled();
        }
示例#2
0
        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);
            }
        }