mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-03-24 20:34:29 +08:00
- 新增架构层支持,包括AbstractArchitecture和ArchitectureAnchorNode - 实现拖拽功能组件AbstractDragDrop2DComponentBase和AbstractDragDropArea2DComponent - 添加节点扩展方法类NodeExtensions,提供多种实用的节点操作方法 - 新增资源目录系统AbstractAssetCatalogSystem用于管理游戏资源 - 实现音频管理系统AbstractAudioManagerSystem支持背景音乐和音效播放 - 添加取消注册扩展方法UnRegisterExtension - 创建GFramework.Game项目模块 - 重构项目结构,聚合核心模块并优化依赖引用 - [no tag]
40 lines
1.2 KiB
C#
40 lines
1.2 KiB
C#
|
|
namespace GFramework.Godot.system;
|
|
|
|
/// <summary>
|
|
/// 资源目录类,用于定义和管理游戏中的场景和资源标识符
|
|
/// </summary>
|
|
public static class AssetCatalog
|
|
{
|
|
/// <summary>
|
|
/// 资源标识符接口,定义了资源路径的访问接口
|
|
/// </summary>
|
|
public interface IAssetId
|
|
{
|
|
/// <summary>
|
|
/// 获取资源的路径
|
|
/// </summary>
|
|
string Path { get; }
|
|
}
|
|
|
|
/// <summary>
|
|
/// 资源目录映射结构体,用于存储资源目录的键值对映射关系
|
|
/// </summary>
|
|
/// <param name="Key">资源目录的键</param>
|
|
/// <param name="Id">资源标识符</param>
|
|
public readonly record struct AssetCatalogMapping(string Key, IAssetId Id);
|
|
|
|
/// <summary>
|
|
/// 场景标识符结构体,用于唯一标识一个场景资源
|
|
/// </summary>
|
|
/// <param name="Path">场景资源的路径</param>
|
|
public readonly record struct SceneId(string Path) : IAssetId;
|
|
|
|
/// <summary>
|
|
/// 资源标识符结构体,用于唯一标识一个游戏资源
|
|
/// </summary>
|
|
/// <param name="Path">游戏资源的路径</param>
|
|
public readonly record struct ResourceId(string Path) : IAssetId;
|
|
|
|
}
|