Esempio n. 1
0
        internal static float LineYPosForLineLayer(BeatmapObjectData beatmapObjectData, float?height)
        {
            float ypos = BaseLinesYPos;

            if (height.HasValue)
            {
                ypos = (height.Value * NoteLinesDistance) + BaseLinesYPos; // offset by 0.25
            }
            else if (beatmapObjectData is NoteData noteData)
            {
                ypos = BeatmapObjectSpawnMovementData.LineYPosForLineLayer(noteData.noteLineLayer);
            }

            return(ypos);
        }
 static void Postfix(BeatmapObjectSpawnMovementData __instance, int noteLineIndex, NoteLineLayer noteLineLayer, ref Vector3 __result, ref float ____noteLinesCount, ref float ____noteLinesDistance, Vector3 ____rightVec)
 {
     if (!Plugin.active)
     {
         return;
     }
     if (noteLineIndex >= 1000 || noteLineIndex <= -1000)
     {
         if (noteLineIndex <= -1000)
         {
             noteLineIndex += 2000;
         }
         float num = -(____noteLinesCount - 1f) * 0.5f;
         num      = (num + (((float)noteLineIndex) * (____noteLinesDistance / 1000)));
         __result = ____rightVec * num + new Vector3(0f, __instance.LineYPosForLineLayer(noteLineLayer), 0f);
     }
     //  Plugin.log.Info($"NoteOffset Index {noteLineIndex} Layer {(int)noteLineLayer} Final Result {__result}");
 }
Esempio n. 3
0
        static void Postfix(int noteLineIndex, NoteLineLayer noteLineLayer, ref Vector2 __result, ref BeatmapObjectSpawnMovementData __instance, float ____noteLinesCount, float ____noteLinesDistance)
        {
            if (!Plugin.active)
            {
                return;
            }
            float x, y = 0;

            if (noteLineIndex >= 1000 || noteLineIndex <= -1000)
            {
                if (noteLineIndex <= -1000)
                {
                    noteLineIndex += 2000;
                }
                float num = -(____noteLinesCount - 1f) * 0.5f;
                x        = (num + (((float)noteLineIndex) * (____noteLinesDistance / 1000)));
                y        = __instance.LineYPosForLineLayer(noteLineLayer);
                __result = new Vector2(x, y);
            }
        }