public async void LoadScene()
        {
            IDifficultyBeatmap        diffBeatmap = BS_Utils.Plugin.LevelData.GameplayCoreSceneSetupData.difficultyBeatmap;
            CustomPreviewBeatmapLevel customPreviewBeatmapLevel = diffBeatmap.level as CustomPreviewBeatmapLevel;

            if (customPreviewBeatmapLevel != null)
            {
                string customLevelPath = customPreviewBeatmapLevel.customLevelPath;
                string mapFileName     = diffBeatmap.difficulty.Name();
                string filepath        = customLevelPath + "\\ExpertPlusEffect.dat";
                Logger.log.Error("custom level path = " + filepath);
                Logger.log.Error("custom level difficulty = " + mapFileName);


                player = new CutEffectPlayer();
                player.Init(gameObject);
                if (await player.TryLoadCutEffectMap(filepath))
                {
                    return;
                }
            }

            player = null;
            //string cutEffectMapPath = "D:\\ProgramFiles\\Steam\\steamapps\\common\\Beat Saber\\Beat Saber_Data\\CustomLevels\\2a7 (Night of Nights - squeaksies)\\ExpertPlusEffect.dat";
        }
Esempio n. 2
0
    // Start is called before the first frame update
    async void Start()
    {
        string customLevelPath = "D:\\ProgramFiles\\Steam\\steamapps\\common\\Beat Saber\\Beat Saber_Data\\CustomLevels\\";

        cutEffectPlayer.Init(gameObject);

        string cutEffectMapPath = customLevelPath + "2a7 (Night of Nights - squeaksies)\\ExpertPlusEffect.dat";

        if (forPlay)
        {
            await cutEffectPlayer.TryLoadCutEffectMap(cutEffectMapPath);

            mapPlayer.OnSendNote.AddListener(cutEffectPlayer.Play);
        }
        if (forEdit)
        {
            await cutEffectPlayer.TryLoadCutEffects();
        }

        string songPath = customLevelPath + "2a7 (Night of Nights - squeaksies)\\Night of Nights (Flowering nights remix).egg";
        string mapPath  = customLevelPath + "2a7 (Night of Nights - squeaksies)\\ExpertPlus.dat";

        bool mapPlayerInited = await mapPlayer.TryInit(songPath, mapPath, gameObject);

        if (mapPlayerInited)
        {
            //if (forEdit) mapPlayer.InitCutEffectMapForEdit();
            AdjustTapKey(mapPlayer.AudioManager_Song.GetAudioClip(), cutEffectPlayer); //必要なのはEditのときだけでは?
            mapPlayer.Play();
        }
        else
        {
            Log.Write("mapPlayer is not Inited");
            return;
        }

        if (pitchController != null)
        {
            pitchController.Init(CutEffectPlayer.TAP_NUM, cutEffectPlayer);
            mapPlayer.OnSendNote.AddListener(pitchController.ShowNote);
        }
    }