![]() |
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.
|
Represents a rectangular region within a tilesheet that contains a grid of frames. More...
Public Member Functions | |
| SKImage? | GetImage (int x, int y) |
| Gets the cached image for the specified frame. | |
| SKBitmap? | GetBitmap (int x, int y) |
| Gets the cached bitmap for the specified frame. | |
| Dictionary<(int x, int y), SKBitmap > | GetAllBitmaps () |
| Collects the cached frame bitmaps indexed by their tile coordinates. | |
| Dictionary<(int x, int y), SKImage > | GetAllImages () |
| Collects the cached frame images indexed by their tile coordinates. | |
| CollisionAdjust | GetFrameCollisionAdjust (int x, int y) |
| Gets the effective collision adjustment for one frame. | |
| bool | TryGetFrameCollisionAdjustOverride (int x, int y, out CollisionAdjust collisionAdjust) |
| Attempts to get the explicit collision adjustment assigned to one frame. | |
| void | SetFrameCollisionAdjust (int x, int y, CollisionAdjust collisionAdjust) |
| Sets the collision adjustment for one frame and updates its cache entry. | |
| bool | ClearFrameCollisionAdjustOverride (int x, int y) |
| Removes a frame-level collision adjustment so the frame once again inherits CollisionAdjust. | |
| Rectangle | GetFrameCollisionArea (int x, int y) |
| Gets the frame-local collision rectangle for one frame. | |
| TileCollisionType | GetFrameCollisionType (int x, int y) |
| Gets the effective collision type for one frame. | |
| bool | TryGetFrameCollisionTypeOverride (int x, int y, out TileCollisionType collisionType) |
| Attempts to get the explicit collision type assigned to one frame. | |
| void | SetFrameCollisionType (int x, int y, TileCollisionType collisionType) |
| Sets an explicit collision type for one frame. | |
| bool | ClearFrameCollisionTypeOverride (int x, int y) |
| Removes a frame-level collision type so the frame once again inherits CollisionType. | |
| void | Dispose () |
| Releases the resources owned by this instance. | |
Static Public Attributes | |
| static readonly string | DefaultRegionName = "default" |
| The default name assigned to tilesheet regions when no name is specified. | |
Properties | |
| Tilesheet | Tilesheet = null! [get] |
| Gets the tilesheet that owns this region. | |
| string | Name = DefaultRegionName [get] |
| Gets the region name. | |
| Rectangle | Area [get, set] |
| Gets or sets the region bounds in tilesheet image pixels. | |
| Size | TileSize [get, set] |
| Gets or sets the tile dimensions in pixels. | |
| Spacing | TilePadding [get, set] |
| Gets or sets the spacing around each tile. | |
| Spacing | RegionMargin [get, set] |
| Gets or sets the spacing inside the region boundary. | |
| Spacing | Overhang = Spacing.None [get, set] |
| Gets or sets visual overhang. This affects rendering, not slicing. | |
| CollisionAdjust | CollisionAdjust [get, set] |
| Gets or sets the collision adjustment inherited by frames that do not have an explicit frame-level override. | |
| Rectangle | CollisionArea [get] |
| Gets the region-default frame-local collision rectangle. | |
| TileCollisionType | CollisionType [get, set] |
| Gets or sets the collision type inherited by frames that do not have an explicit frame-level override. | |
| int | Columns [get] |
| Gets the number of tile columns in the region. | |
| int | Rows [get] |
| Gets the number of tile rows in the region. | |
| int | TileWidthIncludingPadding [get] |
| Gets the horizontal tile stride including padding. | |
| int | TileHeightIncludingPadding [get] |
| Gets the vertical tile stride including padding. | |
Represents a rectangular region within a tilesheet that contains a grid of frames.
Definition at line 11 of file TilesheetRegion.cs.
| bool Gondwana.Drawing.Tilesheets.TilesheetRegion.ClearFrameCollisionAdjustOverride | ( | int | x, |
| int | y ) |
Removes a frame-level collision adjustment so the frame once again inherits CollisionAdjust.
true when an explicit frame override was removed; otherwise, false. | x | The zero-based column in the tile grid. |
| y | The zero-based row in the tile grid. |
Definition at line 365 of file TilesheetRegion.cs.
| bool Gondwana.Drawing.Tilesheets.TilesheetRegion.ClearFrameCollisionTypeOverride | ( | int | x, |
| int | y ) |
Removes a frame-level collision type so the frame once again inherits CollisionType.
| x | The zero-based column in the tile grid. |
| y | The zero-based row in the tile grid. |
true if the frame had a collision type override that was cleared; otherwise, false.Definition at line 472 of file TilesheetRegion.cs.
| void Gondwana.Drawing.Tilesheets.TilesheetRegion.Dispose | ( | ) |
Releases the resources owned by this instance.
Definition at line 682 of file TilesheetRegion.cs.
| Dictionary<(int x, int y), SKBitmap > Gondwana.Drawing.Tilesheets.TilesheetRegion.GetAllBitmaps | ( | ) |
Collects the cached frame bitmaps indexed by their tile coordinates.
Definition at line 227 of file TilesheetRegion.cs.
| Dictionary<(int x, int y), SKImage > Gondwana.Drawing.Tilesheets.TilesheetRegion.GetAllImages | ( | ) |
Collects the cached frame images indexed by their tile coordinates.
Definition at line 254 of file TilesheetRegion.cs.
| SKBitmap? Gondwana.Drawing.Tilesheets.TilesheetRegion.GetBitmap | ( | int | x, |
| int | y ) |
Gets the cached bitmap for the specified frame.
| x | The zero-based column in the tile grid. |
| y | The zero-based row in the tile grid. |
null if the frame is unavailable. The tilesheet retains ownership.Definition at line 206 of file TilesheetRegion.cs.
| CollisionAdjust Gondwana.Drawing.Tilesheets.TilesheetRegion.GetFrameCollisionAdjust | ( | int | x, |
| int | y ) |
Gets the effective collision adjustment for one frame.
| x | The zero-based column in the tile grid. |
| y | The zero-based row in the tile grid. |
Definition at line 283 of file TilesheetRegion.cs.
| Rectangle Gondwana.Drawing.Tilesheets.TilesheetRegion.GetFrameCollisionArea | ( | int | x, |
| int | y ) |
Gets the frame-local collision rectangle for one frame.
| x | The zero-based column in the tile grid. |
| y | The zero-based row in the tile grid. |
| TileCollisionType Gondwana.Drawing.Tilesheets.TilesheetRegion.GetFrameCollisionType | ( | int | x, |
| int | y ) |
Gets the effective collision type for one frame.
| x | The zero-based column in the tile grid. |
| y | The zero-based row in the tile grid. |
Definition at line 404 of file TilesheetRegion.cs.
| SKImage? Gondwana.Drawing.Tilesheets.TilesheetRegion.GetImage | ( | int | x, |
| int | y ) |
Gets the cached image for the specified frame.
| x | The zero-based column in the tile grid. |
| y | The zero-based row in the tile grid. |
null if the frame is unavailable. The tilesheet retains ownership.Definition at line 183 of file TilesheetRegion.cs.
| void Gondwana.Drawing.Tilesheets.TilesheetRegion.SetFrameCollisionAdjust | ( | int | x, |
| int | y, | ||
| CollisionAdjust | collisionAdjust ) |
Sets the collision adjustment for one frame and updates its cache entry.
| x | The zero-based column in the tile grid. |
| y | The zero-based row in the tile grid. |
| collisionAdjust | The adjustment applied to the frame's collision bounds. |
Definition at line 335 of file TilesheetRegion.cs.
| void Gondwana.Drawing.Tilesheets.TilesheetRegion.SetFrameCollisionType | ( | int | x, |
| int | y, | ||
| TileCollisionType | collisionType ) |
Sets an explicit collision type for one frame.
| x | The zero-based column in the tile grid. |
| y | The zero-based row in the tile grid. |
| collisionType | The collision type. |
Definition at line 448 of file TilesheetRegion.cs.
| bool Gondwana.Drawing.Tilesheets.TilesheetRegion.TryGetFrameCollisionAdjustOverride | ( | int | x, |
| int | y, | ||
| out CollisionAdjust | collisionAdjust ) |
Attempts to get the explicit collision adjustment assigned to one frame.
Returns true when an explicit frame-level override exists. When false, no override exists (the frame inherits CollisionAdjust). The collisionAdjust out parameter is only meaningful when the method returns true.
| x | The zero-based column in the tile grid. |
| y | The zero-based row in the tile grid. |
| collisionAdjust | When this method returns, contains the collision adjust. |
true if the operation succeeded; otherwise, false.Definition at line 308 of file TilesheetRegion.cs.
| bool Gondwana.Drawing.Tilesheets.TilesheetRegion.TryGetFrameCollisionTypeOverride | ( | int | x, |
| int | y, | ||
| out TileCollisionType | collisionType ) |
Attempts to get the explicit collision type assigned to one frame.
| x | The zero-based column in the tile grid. |
| y | The zero-based row in the tile grid. |
| collisionType | When this method returns, contains the collision type. |
true if the operation succeeded; otherwise, false.Definition at line 423 of file TilesheetRegion.cs.
|
static |
The default name assigned to tilesheet regions when no name is specified.
Definition at line 16 of file TilesheetRegion.cs.
|
getset |
Gets or sets the region bounds in tilesheet image pixels.
Definition at line 71 of file TilesheetRegion.cs.
|
getset |
Gets or sets the collision adjustment inherited by frames that do not have an explicit frame-level override.
Definition at line 129 of file TilesheetRegion.cs.
|
get |
Gets the region-default frame-local collision rectangle.
Definition at line 143 of file TilesheetRegion.cs.
|
getset |
Gets or sets the collision type inherited by frames that do not have an explicit frame-level override.
Definition at line 150 of file TilesheetRegion.cs.
|
get |
Gets the number of tile columns in the region.
Definition at line 163 of file TilesheetRegion.cs.
|
get |
Gets the region name.
Definition at line 66 of file TilesheetRegion.cs.
|
getset |
Gets or sets visual overhang. This affects rendering, not slicing.
Definition at line 123 of file TilesheetRegion.cs.
|
getset |
Gets or sets the spacing inside the region boundary.
Definition at line 110 of file TilesheetRegion.cs.
|
get |
Gets the number of tile rows in the region.
Definition at line 167 of file TilesheetRegion.cs.
|
get |
Gets the vertical tile stride including padding.
Definition at line 175 of file TilesheetRegion.cs.
|
getsetadd |
Gets or sets the spacing around each tile.
Definition at line 97 of file TilesheetRegion.cs.
|
get |
Gets the tilesheet that owns this region.
Definition at line 61 of file TilesheetRegion.cs.
|
getset |
Gets or sets the tile dimensions in pixels.
Definition at line 84 of file TilesheetRegion.cs.
|
get |
Gets the horizontal tile stride including padding.
Definition at line 171 of file TilesheetRegion.cs.