public static void SetNJS(BeatmapObjectSpawnController _spawnController) { BeatmapObjectSpawnMovementData spawnMovementData = _spawnController.GetPrivateField <BeatmapObjectSpawnMovementData>("_beatmapObjectSpawnMovementData"); float bpm = _spawnController.GetPrivateField <VariableBPMProcessor>("_variableBPMProcessor").currentBPM; spawnMovementData.SetPrivateField("_startNoteJumpMovementSpeed", BS_Utils.Plugin.LevelData.GameplayCoreSceneSetupData.difficultyBeatmap.noteJumpMovementSpeed); spawnMovementData.SetPrivateField("_noteJumpStartBeatOffset", BS_Utils.Plugin.LevelData.GameplayCoreSceneSetupData.difficultyBeatmap.noteJumpStartBeatOffset); spawnMovementData.Update(bpm, _spawnController.GetPrivateField <float>("_jumpOffsetY")); }
public static void UpdateSpawnMovementData(float njs, float noteJumpStartBeatOffset) { BeatmapObjectSpawnMovementData spawnMovementData = _spawnController.GetPrivateField <BeatmapObjectSpawnMovementData>("_beatmapObjectSpawnMovementData"); float bpm = _spawnController.GetPrivateField <VariableBpmProcessor>("_variableBpmProcessor").currentBpm; if (adjustNJSWithSpeed) { float newNJS = njs * (1 / TimeScale); njs = newNJS; } spawnMovementData.SetPrivateField("_startNoteJumpMovementSpeed", njs); spawnMovementData.SetPrivateField("_noteJumpStartBeatOffset", noteJumpStartBeatOffset); spawnMovementData.Update(bpm, _spawnController.GetPrivateField <float>("_jumpOffsetY")); }