Gondwana Game Engine Development (master) - 2.7.0
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
SpriteAnimationSourceDefinition.cs
1using Newtonsoft.Json;
2using Newtonsoft.Json.Converters;
3
5
7[JsonConverter(typeof(StringEnumConverter))]
16
22{
24 public string AnimationKey { get; set; } = string.Empty;
25
27 public SpriteAnimationSourceKind Kind { get; set; } = SpriteAnimationSourceKind.LooseDefinitionFile;
28
30 public string? GaniPath { get; set; }
31
33 public string? AssetsFilePath { get; set; }
34
36 public string? AssetEntryName { get; set; }
37
39 public static SpriteAnimationSourceDefinition Loose(string animationKey, string ganiPath)
40 {
41 ArgumentException.ThrowIfNullOrWhiteSpace(animationKey);
42 ArgumentException.ThrowIfNullOrWhiteSpace(ganiPath);
43 return new() { AnimationKey = animationKey, GaniPath = ganiPath };
44 }
45
48 string animationKey,
49 string assetsFilePath,
50 string assetEntryName)
51 {
52 ArgumentException.ThrowIfNullOrWhiteSpace(animationKey);
53 ArgumentException.ThrowIfNullOrWhiteSpace(assetsFilePath);
54 ArgumentException.ThrowIfNullOrWhiteSpace(assetEntryName);
55
56 return new()
57 {
58 AnimationKey = animationKey,
59 Kind = SpriteAnimationSourceKind.PackedDefinitionFile,
60 AssetsFilePath = assetsFilePath,
61 AssetEntryName = assetEntryName
62 };
63 }
64}
Identifies where authoring tools can find an animation referenced by its logical key....
string? GaniPath
Loose GANI file path relative to the GSPR, when applicable.
static SpriteAnimationSourceDefinition Packed(string animationKey, string assetsFilePath, string assetEntryName)
Creates a packed GANI source reference.
string? AssetsFilePath
GAF path relative to the GSPR, when applicable.
static SpriteAnimationSourceDefinition Loose(string animationKey, string ganiPath)
Creates a loose GANI source reference.
SpriteAnimationSourceKind
Storage form of an optional GANI authoring dependency.