Ejemplo n.º 1
0
 private static void Postfix(ObstacleController __instance)
 {
     if (!(__instance is MultiplayerConnectedPlayerObstacleController))
     {
         __instance.SetActiveColors();
     }
 }
Ejemplo n.º 2
0
        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();
                    }
                }
            }
        }
Ejemplo n.º 3
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();
                    }
                }
            }
        }
Ejemplo n.º 4
0
 private static void Postfix(ObstacleController __instance)
 {
     __instance.SetActiveColors();
 }