mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-05-07 08:44:29 +08:00
- 新增游戏内容配置系统详细文档,涵盖 YAML 配置、JSON Schema 结构、目录组织等 - 添加 Schema 示例和 YAML 示例,展示怪物和物品配置的具体用法 - 提供推荐接入模板,包括目录结构、csproj 配置和启动代码模板 - 添加运行时读取模板和 Architecture 接入模板,简化集成流程 - 实现配置系统运行时校验行为说明,支持多种约束验证 - 添加开发期热重载功能说明和使用方法 - 提供 VS Code 工具支持,包括配置浏览、表单编辑等功能 - 新增配置验证工具实现,支持 JSON Schema 解析和 YAML 验证 - 添加批编辑功能,支持安全更新顶层标量字段和数组 - 提供完整的 API 参考和最佳实践指南
134 lines
4.7 KiB
Plaintext
134 lines
4.7 KiB
Plaintext
// <auto-generated />
|
|
#nullable enable
|
|
|
|
namespace GFramework.Game.Config.Generated;
|
|
|
|
/// <summary>
|
|
/// Auto-generated config type for schema file 'monster.schema.json'.
|
|
/// Represents one monster entry generated from schema metadata.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Constraints: minProperties = 4, maxProperties = 8.
|
|
/// </remarks>
|
|
public sealed partial class MonsterConfig
|
|
{
|
|
/// <summary>
|
|
/// Unique monster identifier.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Schema property path: 'id'.
|
|
/// </remarks>
|
|
public int Id { get; set; }
|
|
|
|
/// <summary>
|
|
/// Localized monster display name.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Schema property path: 'name'.
|
|
/// Display title: 'Monster Name'.
|
|
/// Allowed values: Slime, Goblin.
|
|
/// Constraints: minLength = 3, maxLength = 16, pattern = '^[A-Z][a-z]+$'.
|
|
/// Generated default initializer: = "Slime";
|
|
/// </remarks>
|
|
public string Name { get; set; } = "Slime";
|
|
|
|
/// <summary>
|
|
/// Gets or sets the value mapped from schema property path 'hp'.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Schema property path: 'hp'.
|
|
/// Constraints: const = 10, minimum = 1, exclusiveMinimum = 0, maximum = 999, exclusiveMaximum = 1000, multipleOf = 5.
|
|
/// Generated default initializer: = 10;
|
|
/// </remarks>
|
|
public int? Hp { get; set; } = 10;
|
|
|
|
/// <summary>
|
|
/// Referenced drop ids.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Schema property path: 'dropItems'.
|
|
/// Allowed values: potion, slime_gel.
|
|
/// Constraints: minItems = 1, maxItems = 3, uniqueItems = true, contains = string (const = "potion"), minContains = 1, maxContains = 2.
|
|
/// References config table: 'item'.
|
|
/// Item constraints: minLength = 3, maxLength = 12.
|
|
/// Generated default initializer: = new string[] { "potion" };
|
|
/// </remarks>
|
|
public global::System.Collections.Generic.IReadOnlyList<string> DropItems { get; set; } = new string[] { "potion" };
|
|
|
|
/// <summary>
|
|
/// Reward payload.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Schema property path: 'reward'.
|
|
/// Generated default initializer: = new();
|
|
/// </remarks>
|
|
public RewardConfig Reward { get; set; } = new();
|
|
|
|
/// <summary>
|
|
/// Encounter phases.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Schema property path: 'phases'.
|
|
/// Generated default initializer: = global::System.Array.Empty<PhasesItemConfig>();
|
|
/// </remarks>
|
|
public global::System.Collections.Generic.IReadOnlyList<PhasesItemConfig> Phases { get; set; } = global::System.Array.Empty<PhasesItemConfig>();
|
|
|
|
/// <summary>
|
|
/// Auto-generated nested config type for schema property path 'reward'.
|
|
/// Reward payload.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Constraints: minProperties = 2, maxProperties = 2.
|
|
/// </remarks>
|
|
public sealed partial class RewardConfig
|
|
{
|
|
/// <summary>
|
|
/// Gets or sets the value mapped from schema property path 'reward.gold'.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Schema property path: 'reward.gold'.
|
|
/// Constraints: minimum = 0.
|
|
/// Generated default initializer: = 10;
|
|
/// </remarks>
|
|
public int Gold { get; set; } = 10;
|
|
|
|
/// <summary>
|
|
/// Gets or sets the value mapped from schema property path 'reward.currency'.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Schema property path: 'reward.currency'.
|
|
/// Allowed values: coin, gem.
|
|
/// Generated default initializer: = string.Empty;
|
|
/// </remarks>
|
|
public string Currency { get; set; } = string.Empty;
|
|
|
|
}
|
|
|
|
/// <summary>
|
|
/// Auto-generated nested config type for schema property path 'phases[]'.
|
|
/// This nested type is generated so object-valued schema fields remain strongly typed in consumer code.
|
|
/// </summary>
|
|
public sealed partial class PhasesItemConfig
|
|
{
|
|
/// <summary>
|
|
/// Gets or sets the value mapped from schema property path 'phases[].wave'.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Schema property path: 'phases[].wave'.
|
|
/// </remarks>
|
|
public int Wave { get; set; }
|
|
|
|
/// <summary>
|
|
/// Monster reference id.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Schema property path: 'phases[].monsterId'.
|
|
/// Constraints: minLength = 2, maxLength = 32.
|
|
/// References config table: 'monster'.
|
|
/// Generated default initializer: = string.Empty;
|
|
/// </remarks>
|
|
public string MonsterId { get; set; } = string.Empty;
|
|
|
|
}
|
|
}
|