Example #1
0
        private GradientController(
            SaberColorizerManager saberColorizerManager,
            LightColorizerManager lightColorizerManager,
            ObstacleColorizerManager obstacleColorizerManager,
            NoteColorizerManager noteColorizerManager,
            BombColorizerManager bombColorizerManager,
            BackgroundGradientColorizer backgroundGradientColorizer)
        {
            _saberColorizerManager       = saberColorizerManager;
            _lightColorizerManager       = lightColorizerManager;
            _obstacleColorizerManager    = obstacleColorizerManager;
            _noteColorizerManager        = noteColorizerManager;
            _bombColorizerManager        = bombColorizerManager;
            _backgroundGradientColorizer = backgroundGradientColorizer;
            _match = TechnicolorConfig.Instance.Desync;
            _mismatchSpeedOffset = _match ? 0 : 0.5f;
            _timeMult            = TechnicolorConfig.Instance.TechnicolorLightsFrequency;
            _timeGlobalMult      = (TechnicolorConfig.Instance.TechnicolorLightsFrequency / 2) + 0.7f;

            TechnicolorConfig config = TechnicolorConfig.Instance;

            if (config.TechnicolorLightsStyle == TechnicolorStyle.GRADIENT)
            {
                UpdateTechnicolourEvent += RainbowLights;
            }

            if (config.TechnicolorLightsStyle != TechnicolorStyle.OFF && !config.DisableGradientBackground)
            {
                UpdateTechnicolourEvent += RainbowGradientBackground;
            }

            if (config.TechnicolorBlocksStyle == TechnicolorStyle.GRADIENT)
            {
                UpdateTechnicolourEvent += RainbowNotes;
            }

            if (config.TechnicolorWallsStyle == TechnicolorStyle.GRADIENT)
            {
                UpdateTechnicolourEvent += RainbowWalls;
            }

            if (config.TechnicolorBombsStyle == TechnicolorStyle.GRADIENT)
            {
                UpdateTechnicolourEvent += RainbowBombs;
            }

            // sabers use this script regardless of technicolour style
            if (config.TechnicolorSabersStyle == TechnicolorStyle.OFF)
            {
                return;
            }

            switch (config.TechnicolorSabersStyle)
            {
            case TechnicolorStyle.GRADIENT:
                UpdateTechnicolourEvent += GradientTick;
                break;

            case TechnicolorStyle.PURE_RANDOM:
                _leftSaberPalette        = new[] { Color.HSVToRGB(Random.value, 1f, 1f), Color.HSVToRGB(Random.value, 1f, 1f) };
                _rightSaberPalette       = new[] { Color.HSVToRGB(Random.value, 1f, 1f), Color.HSVToRGB(Random.value, 1f, 1f) };
                UpdateTechnicolourEvent += RandomTick;
                break;

            default:
                _leftSaberPalette        = TechnicolorController.TechnicolorWarmPalette;
                _rightSaberPalette       = TechnicolorController.TechnicolorColdPalette;
                UpdateTechnicolourEvent += PaletteTick;
                break;
            }

            UpdateTechnicolourEvent += RainbowSabers;
        }
Example #2
0
 private TechniObstacle(ObstacleColorizerManager manager)
 {
     _manager = manager;
 }