Exemplo n.º 1
0
        public static void SetNJS(BeatmapObjectSpawnController spawnController)
        {
            BeatmapObjectSpawnMovementData spawnMovementData = spawnController.GetField <BeatmapObjectSpawnMovementData, BeatmapObjectSpawnController>("_beatmapObjectSpawnMovementData");

            var bpm = spawnController.GetField <VariableBpmProcessor, BeatmapObjectSpawnController>("_variableBPMProcessor").currentBpm;

            spawnMovementData.SetField("_startNoteJumpMovementSpeed", BS_Utils.Plugin.LevelData.GameplayCoreSceneSetupData.difficultyBeatmap.noteJumpMovementSpeed);
            spawnMovementData.SetField("_noteJumpStartBeatOffset", BS_Utils.Plugin.LevelData.GameplayCoreSceneSetupData.difficultyBeatmap.noteJumpStartBeatOffset);

            spawnMovementData.Update(bpm, spawnController.GetField <float, BeatmapObjectSpawnController>("_jumpOffsetY"));
        }
Exemplo n.º 2
0
        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"));
        }