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
SpriteTilesheetSourceDefinition.cs
1using Newtonsoft.Json;
2using Newtonsoft.Json.Converters;
3
5
10[JsonConverter(typeof(StringEnumConverter))]
22
28{
32 public string Tilesheet { get; set; } = string.Empty;
36 public SpriteTilesheetSourceKind Kind { get; set; } = SpriteTilesheetSourceKind.LooseDefinitionFile;
40 public string? GtsPath { get; set; }
44 public string? AssetsFilePath { get; set; }
48 public string? AssetEntryName { get; set; }
49
56 public static SpriteTilesheetSourceDefinition Loose(string tilesheet, string gtsPath)
57 {
58 ArgumentException.ThrowIfNullOrWhiteSpace(tilesheet);
59 ArgumentException.ThrowIfNullOrWhiteSpace(gtsPath);
60 return new()
61 {
62 Tilesheet = tilesheet,
63 Kind = SpriteTilesheetSourceKind.LooseDefinitionFile,
64 GtsPath = gtsPath
65 };
66 }
67
76 string tilesheet,
77 string assetsFilePath,
78 string assetEntryName)
79 {
80 ArgumentException.ThrowIfNullOrWhiteSpace(tilesheet);
81 ArgumentException.ThrowIfNullOrWhiteSpace(assetsFilePath);
82 ArgumentException.ThrowIfNullOrWhiteSpace(assetEntryName);
83 return new()
84 {
85 Tilesheet = tilesheet,
86 Kind = SpriteTilesheetSourceKind.PackedDefinitionFile,
87 AssetsFilePath = assetsFilePath,
88 AssetEntryName = assetEntryName
89 };
90 }
91}
Describes an authoring-time source for a logical tilesheet referenced by a GSPR definition....
static SpriteTilesheetSourceDefinition Loose(string tilesheet, string gtsPath)
Creates a reference to a definition stored in a loose file.
string? GtsPath
Gets or sets the path to the loose GTS tilesheet definition.
static SpriteTilesheetSourceDefinition Packed(string tilesheet, string assetsFilePath, string assetEntryName)
Creates a reference to a definition stored inside an assets file.
string? AssetsFilePath
Gets or sets the path to the containing assets file.
string? AssetEntryName
Gets or sets the entry name inside the assets file.
@ LooseDefinitionFile
The definition is stored in a loose file.
@ PackedDefinitionFile
The definition is stored in an assets file.
SpriteTilesheetSourceKind
Identifies how a GSPR definition can locate one of its logical GTS dependencies for authoring and too...