mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-03-22 19:03:29 +08:00
- 将所有小写的命名空间导入更正为首字母大写格式 - 统一 GFramework 框架的命名空间引用规范 - 修复 core、ecs、godot 等模块的命名空间导入错误 - 标准化文档示例代码中的 using 语句格式 - 确保所有文档中的命名空间引用保持一致性 - 更新 global using 语句以匹配正确的命名空间格式
50 lines
1.9 KiB
C#
50 lines
1.9 KiB
C#
// Copyright (c) 2026 GeWuYou
|
||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||
// you may not use this file except in compliance with the License.
|
||
// You may obtain a copy of the License at
|
||
//
|
||
// http://www.apache.org/licenses/LICENSE-2.0
|
||
//
|
||
// Unless required by applicable law or agreed to in writing, software
|
||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
// See the License for the specific language governing permissions and
|
||
// limitations under the License.
|
||
|
||
using GFramework.Game.Abstractions.Data;
|
||
using Godot;
|
||
|
||
namespace GFramework.Godot.Data;
|
||
|
||
/// <summary>
|
||
/// 定义资源仓储接口,专门用于管理Godot资源的加载和存储
|
||
/// 继承自通用仓储接口,添加了从路径加载资源的功能
|
||
/// </summary>
|
||
/// <typeparam name="TKey">资源键的类型</typeparam>
|
||
/// <typeparam name="TResource">资源类型,必须继承自Godot.Resource</typeparam>
|
||
public interface IResourceRepository<in TKey, TResource> : IRepository<TKey, TResource> where TResource : Resource
|
||
{
|
||
/// <summary>
|
||
/// 从指定路径集合加载资源
|
||
/// </summary>
|
||
/// <param name="paths">资源文件路径集合</param>
|
||
void LoadFromPath(IEnumerable<string> paths);
|
||
|
||
/// <summary>
|
||
/// 从指定路径数组加载资源
|
||
/// </summary>
|
||
/// <param name="paths">资源文件路径数组</param>
|
||
void LoadFromPath(params string[] paths);
|
||
|
||
/// <summary>
|
||
/// 递归从指定路径集合加载资源
|
||
/// </summary>
|
||
/// <param name="paths">资源文件路径集合</param>
|
||
void LoadFromPathRecursive(IEnumerable<string> paths);
|
||
|
||
/// <summary>
|
||
/// 递归从指定路径数组加载资源
|
||
/// </summary>
|
||
/// <param name="paths">资源文件路径数组</param>
|
||
void LoadFromPathRecursive(params string[] paths);
|
||
} |