Gondwana Game Engine Development (master) - 2.6.1
Gondwana is a cross-platform 2.5D game and rendering engine written in C#/.NET 8. It provides fine-grained control over rendering, timing, and scene composition, with built-in support for parallax, z-ordering, pixel overhang, collision detection, and particle effects. Gondwana targets desktop and web platforms using SkiaSharp for graphics and pluggable audio backends for desktop and browser targets.
Loading...
Searching...
No Matches
AnimationTilesheetSourceDefinition.cs
1using Newtonsoft.Json;
2using Newtonsoft.Json.Converters;
3
5
10[JsonConverter(typeof(StringEnumConverter))]
23
29{
33 public string Tilesheet { get; set; } = string.Empty;
34
38 public AnimationTilesheetSourceKind Kind { get; set; } =
39 AnimationTilesheetSourceKind.LooseDefinitionFile;
40
44 public string? GtsPath { get; set; }
45
50 public string? AssetsFilePath { get; set; }
51
55 public string? AssetEntryName { get; set; }
56
64 string tilesheet,
65 string gtsPath)
66 {
67 if (string.IsNullOrWhiteSpace(tilesheet))
68 throw new ArgumentException("Tilesheet name must be a non-empty string.", nameof(tilesheet));
69
70 if (string.IsNullOrWhiteSpace(gtsPath))
71 throw new ArgumentException("GTS path must be a non-empty string.", nameof(gtsPath));
72
74 {
75 Tilesheet = tilesheet,
76 Kind = AnimationTilesheetSourceKind.LooseDefinitionFile,
77 GtsPath = gtsPath
78 };
79 }
80
89 string tilesheet,
90 string assetsFilePath,
91 string assetEntryName)
92 {
93 if (string.IsNullOrWhiteSpace(tilesheet))
94 throw new ArgumentException("Tilesheet name must be a non-empty string.", nameof(tilesheet));
95
96 if (string.IsNullOrWhiteSpace(assetsFilePath))
97 throw new ArgumentException("Assets file path must be a non-empty string.", nameof(assetsFilePath));
98
99 if (string.IsNullOrWhiteSpace(assetEntryName))
100 throw new ArgumentException("Asset entry name must be a non-empty string.", nameof(assetEntryName));
101
103 {
104 Tilesheet = tilesheet,
105 Kind = AnimationTilesheetSourceKind.PackedDefinitionFile,
106 AssetsFilePath = assetsFilePath,
107 AssetEntryName = assetEntryName
108 };
109 }
110}
Describes an authoring-time source for a logical tilesheet referenced by a GANI definition....
string? AssetEntryName
Gets or sets the GTS entry name inside AssetsFilePath.
static AnimationTilesheetSourceDefinition Loose(string tilesheet, string gtsPath)
Creates a loose-GTS source reference.
string? AssetsFilePath
Gets or sets the assets-file path for a packed GTS definition. Relative paths are resolved from the c...
static AnimationTilesheetSourceDefinition Packed(string tilesheet, string assetsFilePath, string assetEntryName)
Creates a packed-GTS source reference.
string Tilesheet
Gets or sets the logical tilesheet name used by animation frame references.
AnimationTilesheetSourceKind Kind
Gets or sets how the referenced GTS definition is stored.
string? GtsPath
Gets or sets the loose .gts path. Relative paths are resolved from the containing ....
AnimationTilesheetSourceKind
Identifies how a GANI definition can locate one of its logical GTS dependencies for authoring and too...