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