编队系统大更新 基本快搞好了 准备做敌人和分数

This commit is contained in:
FloatGaming
2025-11-10 22:41:13 +08:00
parent 7837c6adf0
commit 941b294fce
98 changed files with 8933 additions and 98 deletions
+24
View File
@@ -1,5 +1,9 @@
using UnityEngine;
using System;
using UnityEngine.SceneManagement;
#if UNITY_EDITOR
using UnityEditor;
#endif
/// <summary>
/// Simple pause manager. Call Pause(true) to pause or Pause(false) to resume.
@@ -32,10 +36,30 @@ public class PauseManager : MonoBehaviour
void Update()
{
// Delete = immediate quit (stop play in editor or quit app)
if (Input.GetKeyDown(KeyCode.Delete))
{
#if UNITY_EDITOR
EditorApplication.isPlaying = false;
#else
Application.Quit();
#endif
return;
}
if (Input.GetKeyDown(KeyCode.Escape))
{
TogglePause();
}
// 当处于暂停状态且按下 Backspace 时返回主界面
if (IsPaused && Input.GetKeyDown(KeyCode.Backspace))
{
// 恢复时间流并触发事件,然后加载主场景
Pause(false);
// 确保场景名称与项目中的主场景匹配
SceneManager.LoadScene("Main_main");
}
}
/// <summary>