修了很多bug和增加功能,优化不少问题
This commit is contained in:
@@ -283,12 +283,17 @@ public class GameManager : MonoBehaviour
|
||||
|
||||
// --- Initialize Statistics ---
|
||||
currentSong = BeatmapManager.pendingSongData ?? SongDataHolder.SelectedSongData;
|
||||
if (currentSong != null)
|
||||
if (currentSong != null && !GameConfig.autoPlayEnabled)
|
||||
{
|
||||
currentSong.game_enterTimes++;
|
||||
sessionStartTime = Time.realtimeSinceStartup;
|
||||
Debug.Log($"[GameManager] {currentSong.songName} launch count incremented to {currentSong.game_enterTimes}");
|
||||
}
|
||||
else if (currentSong != null && GameConfig.autoPlayEnabled)
|
||||
{
|
||||
sessionStartTime = Time.realtimeSinceStartup;
|
||||
Debug.Log($"[GameManager] {currentSong.songName} autoplay enabled, skipping launch count increment");
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogWarning("[GameManager] No SongData found for statistics tracking");
|
||||
@@ -1166,7 +1171,7 @@ public class GameManager : MonoBehaviour
|
||||
/// </summary>
|
||||
public void RecordTotalPlayTime()
|
||||
{
|
||||
if (timeRecorded || currentSong == null) return;
|
||||
if (timeRecorded || currentSong == null || GameConfig.autoPlayEnabled) return;
|
||||
|
||||
float elapsed = Time.realtimeSinceStartup - sessionStartTime;
|
||||
currentSong.time_totalPlayingTime += elapsed;
|
||||
|
||||
Reference in New Issue
Block a user