GFramework/GFramework.Godot/extensions/GodotPathExtensions.cs
GwWuYou 807dbc482e feat(setting): 添加设置管理系统和Godot平台实现
- 实现了SettingsModel用于管理应用程序设置部分
- 创建了SettingsSystem用于应用各种设置配置
- 添加了AudioSettings和GraphicsSettings基础设置类
- 定义了ISettingsModel、ISettingsSystem等核心接口
- 实现了GodotAudioApplier用于应用音频设置到Godot音频系统
- 创建了GodotGraphicsSettings用于管理游戏图形显示设置
- 添加了GodotFileStorage特化文件存储实现
- 实现了Godot路径扩展方法IsUserPath、IsResPath、IsGodotPath
- 添加了AudioBusMap音频总线映射配置类
2026-01-12 21:07:27 +08:00

22 lines
728 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.Godot.extensions;
public static class GodotPathExtensions
{
/// <summary>
/// 判断是否是 Godot 用户数据路径user://
/// </summary>
public static bool IsUserPath(this string path)
=> !string.IsNullOrEmpty(path) && path.StartsWith("user://");
/// <summary>
/// 判断是否是 Godot 资源路径res://
/// </summary>
public static bool IsResPath(this string path)
=> !string.IsNullOrEmpty(path) && path.StartsWith("res://");
/// <summary>
/// 判断是否是 Godot 特殊路径user:// 或 res://
/// </summary>
public static bool IsGodotPath(this string path)
=> path.IsUserPath() || path.IsResPath();
}