using System; using System.Collections.Generic; namespace Core; /// /// 资源定义接口(用于 .tres/.res 的内容加载) /// 设计说明: /// 1) 资源负责“序列化友好”,模型负责“运行时友好”。 /// 2) 通过 ToDefinition 映射到纯数据模型,保持解耦。 /// 注意事项: /// - 资源字段尽量使用 Godot 可序列化的基础类型与 Array。 /// 未来扩展: /// - 可加入验证器,确保 Id/路径等关键字段符合规范。 /// public interface IContentResource { Type GetDefinitionType(); object ToDefinition(); } public interface IContentResourceCollection { IEnumerable GetItems(); }