private static void TrackColorize(ObstacleController obstacleController, ObstacleData obstacleData, AudioTimeSyncController audioTimeSyncController, float startTimeOffset, float move1Duration, float move2Duration, float obstacleDuration)
        {
            if (NoodleExtensions.NoodleController.NoodleExtensionsActive)
            {
                ChromaNoodleData chromaData = TryGetNoodleData(obstacleData);
                if (chromaData == null)
                {
                    return;
                }

                Track           track = chromaData.Track;
                PointDefinition pathPointDefinition = chromaData.LocalPathColor;
                if (track != null || pathPointDefinition != null)
                {
                    float jumpDuration = move2Duration;
                    float elapsedTime  = audioTimeSyncController.songTime - startTimeOffset;
                    float normalTime   = (elapsedTime - move1Duration) / (jumpDuration + obstacleDuration);

                    Chroma.AnimationHelper.GetColorOffset(pathPointDefinition, track, normalTime, out Color? colorOffset);

                    if (colorOffset.HasValue)
                    {
                        obstacleController.SetObstacleColor(colorOffset.Value);
                        obstacleController.SetActiveColors();
                    }
                }
            }
        }
示例#2
0
        private static void Prefix(ObstacleController __instance, ObstacleData obstacleData)
        {
            if (!(__instance is MultiplayerConnectedPlayerObstacleController))
            {
                ChromaObjectData chromaData = ChromaObjectDatas[obstacleData];
                Color?           color      = chromaData.Color;

                if (color.HasValue)
                {
                    __instance.SetObstacleColor(color.Value);
                }
                else
                {
                    __instance.Reset();
                }
            }
        }
示例#3
0
        private static void Prefix(ObstacleController __instance, ObstacleData obstacleData)
        {
            if (obstacleData is CustomObstacleData customData)
            {
                dynamic dynData = customData.customData;

                Color?color = ChromaUtils.GetColorFromData(dynData);

                if (color.HasValue)
                {
                    __instance.SetObstacleColor(color.Value);
                }
                else
                {
                    __instance.Reset();
                }
            }
        }
示例#4
0
#pragma warning disable SA1313 // Parameter names should begin with lower-case letter
        private static void Prefix(ObstacleController __instance, ObstacleData obstacleData)
#pragma warning restore SA1313 // Parameter names should begin with lower-case letter
        {
            if (obstacleData is CustomObstacleData customData)
            {
                dynamic dynData = customData.customData;

                Color?color = ChromaUtils.GetColorFromData(dynData);

                if (color.HasValue)
                {
                    __instance.SetObstacleColor(color.Value);
                }
                else
                {
                    __instance.Reset();
                }
            }
        }
示例#5
0
        private static void TrackColorize(ObstacleController obstacleController, ObstacleData obstacleData, AudioTimeSyncController audioTimeSyncController, float startTimeOffset, float move1Duration, float move2Duration, float obstacleDuration)
        {
            if (obstacleData is CustomObstacleData customData)
            {
                dynamic dynData         = customData.customData;
                Track   track           = AnimationHelper.GetTrack(dynData);
                dynamic animationObject = Trees.at(dynData, "_animation");

                if (track != null || animationObject != null)
                {
                    float jumpDuration = move2Duration;
                    float elapsedTime  = audioTimeSyncController.songTime - startTimeOffset;
                    float normalTime   = (elapsedTime - move1Duration) / (jumpDuration + obstacleDuration);

                    Chroma.AnimationHelper.GetColorOffset(animationObject, track, normalTime, out Color? colorOffset);

                    if (colorOffset.HasValue)
                    {
                        obstacleController.SetObstacleColor(colorOffset.Value);
                        obstacleController.SetActiveColors();
                    }
                }
            }
        }
示例#6
0
#pragma warning disable SA1313 // Parameter names should begin with lower-case letter
        private static void Prefix(ObstacleController __instance, ObstacleData obstacleData)
#pragma warning restore SA1313 // Parameter names should begin with lower-case letter
        {
            __instance.SetObstacleColor(TechnicolorController.GetTechnicolor(true, obstacleData.time + __instance.GetInstanceID(), TechnicolorConfig.Instance.TechnicolorWallsStyle));
        }