perf
This commit is contained in:
@@ -5,10 +5,11 @@ using Ichni.RhythmGame;
|
||||
using Ichni.RhythmGame.UI;
|
||||
using Sirenix.OdinInspector;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
namespace Ichni
|
||||
{
|
||||
public class GameManager : SerializedMonoBehaviour
|
||||
public partial class GameManager : SerializedMonoBehaviour
|
||||
{
|
||||
public static GameManager instance;
|
||||
|
||||
@@ -33,6 +34,8 @@ namespace Ichni
|
||||
public ProjectInformation projectInformation;
|
||||
public SongInformation songInformation;
|
||||
|
||||
public NoteManager noteManager;
|
||||
|
||||
public BasePrefabsCollection basePrefabs;
|
||||
public Dictionary<string, CustomPrefabsCollection> customPrefabs;
|
||||
|
||||
@@ -42,7 +45,7 @@ namespace Ichni
|
||||
public GameLoadingCanvas gameLoadingCanvas;
|
||||
public SummaryPageCanvas summaryPageCanvas;
|
||||
|
||||
public float songTime => audioManager.songPlayer.songTimeSegment;
|
||||
public float songTime => audioManager.songPlayer.songTimeSegment - songInformation.offset;
|
||||
|
||||
public bool isDebugging;
|
||||
|
||||
@@ -57,4 +60,19 @@ namespace Ichni
|
||||
projectLoader.TestLoad();
|
||||
}
|
||||
}
|
||||
|
||||
public partial class GameManager
|
||||
{
|
||||
public static void RestartGame()
|
||||
{
|
||||
SceneManager.LoadScene("GameScene");
|
||||
Time.timeScale = 1f; // 确保重启时时间缩放恢复正常
|
||||
}
|
||||
|
||||
public static void ReturnToMenu()
|
||||
{
|
||||
SceneManager.LoadScene("MenuScene");
|
||||
Time.timeScale = 1f; // 确保返回时时间缩放恢复正常
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user