GeWuYou 7734fba56f feat(pause): 添加暂停栈管理系统
- 实现了 PauseStackManager 核心管理器,支持嵌套暂停和分组管理
- 添加了 PauseToken 暂停令牌和 PauseGroup 暂停组枚举
- 创建了 PauseScope 作用域类,支持 using 语法自动管理暂停生命周期
- 实现了线程安全的暂停栈操作,包括 Push、Pop 和状态查询
- 添加了暂停处理器接口 IPauseHandler 和 Godot 平台具体实现
- 提供了完整的单元测试覆盖基础功能、嵌套暂停、分组管理和线程安全场景
2026-03-02 21:51:35 +08:00

42 lines
742 B
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

namespace GFramework.Core.Abstractions.pause;
/// <summary>
/// 暂停组枚举,定义不同的暂停作用域
/// </summary>
public enum PauseGroup
{
/// <summary>
/// 全局暂停(影响所有系统)
/// </summary>
Global = 0,
/// <summary>
/// 游戏逻辑暂停(不影响 UI
/// </summary>
Gameplay = 1,
/// <summary>
/// 动画暂停
/// </summary>
Animation = 2,
/// <summary>
/// 音频暂停
/// </summary>
Audio = 3,
/// <summary>
/// 自定义组 1
/// </summary>
Custom1 = 10,
/// <summary>
/// 自定义组 2
/// </summary>
Custom2 = 11,
/// <summary>
/// 自定义组 3
/// </summary>
Custom3 = 12
}