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