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
DefinitionDependencyProvenance.cs
7
9
15internal static class DefinitionDependencyProvenance
16{
17 internal static DefinitionProvenance? ForTilesheet(Tilesheet? tilesheet)
18 {
19 var provenance = tilesheet?.DefinitionProvenance;
20
21 return provenance is not null &&
22 provenance.Matches(TilesheetDefinitionSerializer.FromTilesheet(tilesheet!))
23 ? provenance
24 : null;
25 }
26
32 internal static IEnumerable<(string Key, DefinitionProvenance Source)> ForAnimationChain(
33 string key,
34 HashSet<string> visited)
35 {
36 var nextKey = key;
37
38 while (!string.IsNullOrWhiteSpace(nextKey) && visited.Add(nextKey))
39 {
40 if (!Cycle._cycles.TryGetValue(nextKey, out var cycle))
41 yield break;
42
43 var provenance = cycle.DefinitionProvenance;
44
45 if (provenance is not null &&
46 provenance.Matches(AnimationDefinitionSerializer.FromCycle(cycle)))
47 yield return (cycle.CycleKey, provenance);
48
49 // Keep traversing when this cycle lacks usable provenance: a later
50 // transition can still have an independently persisted definition.
51 nextKey = cycle.NextCycle?.CycleKey;
52 }
53 }
54
55 internal static DefinitionProvenance? ForScene(Scene? scene)
56 {
57 var provenance = scene?.DefinitionProvenance;
58
59 return provenance is not null &&
60 provenance.Matches(SceneDefinitionSerializer.FromScene(scene!))
61 ? provenance
62 : null;
63 }
64}
References a FrameSequence object, along with a particular Throttle value for animating through Frame...
Definition Cycle.cs:15
Represents a tilesheet image and metadata for rendering tiles.
Definition Tilesheet.cs:15
Represents a game scene containing multiple layers of tiles, sprites, and game objects....
Definition Scene.cs:35