update
This commit is contained in:
@@ -3,6 +3,7 @@ using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using AK.Wwise;
|
||||
using Ichni.RhythmGame;
|
||||
using Sirenix.OdinInspector;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Serialization;
|
||||
@@ -56,6 +57,49 @@ namespace Ichni.Menu
|
||||
{
|
||||
return (from song in songs where song.storyUnlockKey == key select song.songName).ToList();
|
||||
}
|
||||
|
||||
public (int, int, int, int, int) GetChapterSaveInfo()
|
||||
{
|
||||
int beatmapCount = 0;
|
||||
int finishedSongCount = 0;
|
||||
int finishedBeatmapCount = 0;
|
||||
int fullComboCount = 0;
|
||||
int allPerfectCount = 0;
|
||||
|
||||
foreach (SongItemData song in songs)
|
||||
{
|
||||
if (GameSaveManager.instance.SongSaveModule.songStatusSaves.TryGetValue(song.songName, out var songStatus))
|
||||
{
|
||||
bool thisSongFinished = false;
|
||||
foreach (BeatmapSave beatmapSave in songStatus.beatmapSaves)
|
||||
{
|
||||
beatmapCount++;
|
||||
if (!beatmapSave.IsEmpty())
|
||||
{
|
||||
thisSongFinished = true;
|
||||
finishedBeatmapCount++;
|
||||
|
||||
if (beatmapSave.isFullCombo)
|
||||
{
|
||||
fullComboCount++;
|
||||
}
|
||||
|
||||
if (beatmapSave.isAllPerfect)
|
||||
{
|
||||
allPerfectCount++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (thisSongFinished)
|
||||
{
|
||||
finishedSongCount++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return (beatmapCount, finishedSongCount, finishedBeatmapCount, fullComboCount, allPerfectCount);
|
||||
}
|
||||
}
|
||||
|
||||
[InlineProperty]
|
||||
|
||||
Reference in New Issue
Block a user