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
TilesheetRegionDefinition.cs
1using System.ComponentModel;
2using System.Drawing;
4
6
10public sealed class TilesheetRegionDefinition
11{
15 [Description("Name used to reference this set of frames from a tilesheet, animation, or scene.")]
16 public string Name { get; set; } = TilesheetRegion.DefaultRegionName;
17
21 [Description(
22 "Rectangle in source-image pixels containing this region's frame grid, including margins and padding.")]
23 public Rectangle Area { get; set; }
24
28 [Description("Width and height in source-image pixels of a single frame in this region.")]
29 public Size TileSize { get; set; }
30
34 [Description(
35 "Unused pixel space surrounding each frame within the grid; the gap between neighboring frames includes both adjacent padding edges.")]
36 public Spacing TilePadding { get; set; } = Spacing.None;
37
41 [Description("Unused pixel border between the region rectangle and its frame grid, in source-image pixels.")]
42 public Spacing RegionMargin { get; set; } = Spacing.None;
43
47 [Description(
48 "How far the frame artwork visually extends beyond the logical tile footprint on each side, in pixels.")]
49 public Spacing Overhang { get; set; } = Spacing.None;
50
54 [Description(
55 "Default collision-box edge insets for frames in this region; positive values shrink and negative values expand the box.")]
57
62 [Description("Default collision behavior inherited by frames without an explicit per-frame collision type.")]
64
69 [Description(
70 "Optional per-frame collision overrides; frames without overrides inherit the region collision settings.")]
71 public List<TilesheetFrameDefinition> Frames { get; set; } = [];
72}
Defines a rectangular region within a tilesheet, including layout and collision metadata.
Spacing Overhang
Gets or sets the visual overhang beyond the logical tile bounds.
Rectangle Area
Gets or sets the rectangular bounds of this region in the source image.
CollisionAdjust CollisionAdjust
Gets or sets the region-level collision adjustment applied to all frames by default.
Size TileSize
Gets or sets the size of individual frames in this region.
Spacing TilePadding
Gets or sets the spacing between adjacent frames.
TileCollisionType CollisionType
Gets or sets the region-level collision type inherited by frames without an explicit collision-type o...
List< TilesheetFrameDefinition > Frames
Gets or sets per-frame collision metadata for this region. A missing collision property on a frame me...
Spacing RegionMargin
Gets or sets the margin around the frame grid.
Represents a rectangular region within a tilesheet that contains a grid of frames.
static readonly string DefaultRegionName
The default name assigned to tilesheet regions when no name is specified.
record struct Spacing([property:JsonProperty("left")] int Left, [property:JsonProperty("top")] int Top, [property:JsonProperty("right")] int Right, [property:JsonProperty("bottom")] int Bottom)
Represents dimensions in pixels when spacing Tilesheets.
Definition Spacing.cs:12
TileCollisionType
Defines the default collision behavior associated with a tilesheet region, frame, or runtime tile.
Per-edge inset amounts applied to visual bounds to produce a collision rectangle.
static readonly CollisionAdjust None
Represents an adjustment with no pixel offsets.