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
TileCollider.cs
2
4
8public sealed class TileCollider : ICollider
9{
10 private readonly Tile _tile;
11
20 public TileCollider(Tile tile, int collisionGroup, int collidesWith, CollisionResponseType responseType = CollisionResponseType.Solid)
21 {
22 _tile = tile ?? throw new ArgumentNullException(nameof(tile));
23 CollisionGroup = collisionGroup;
24 CollidesWith = collidesWith;
25 ResponseType = responseType;
26 }
27
31 public Aabb BoundsWorldPx => Aabb.FromRectangle(_tile.CollisionArea);
32
36 public ICollisionEntity Owner => _tile;
37
41 public bool IsStatic => _tile.IsPositionFixed;
42
46 public int CollisionGroup { get; set; }
47
51 public int CollidesWith { get; set; }
52
57}
CollisionResponseType ResponseType
Gets or sets how this collider responds to collisions (Solid blocks movement, Trigger reports only).
Aabb BoundsWorldPx
Gets the world-space axis-aligned bounding box in scene world pixels.
ICollisionEntity Owner
Gets the tile that owns this collider.
int CollidesWith
Gets or sets the bitmask of collision groups this collider interacts with.
bool IsStatic
Gets a value indicating whether this is a static, non-moving collider based on the tile's fixed posit...
int CollisionGroup
Gets or sets the bitmask identifying what this collider is (e.g., Player = 1, World = 2,...
TileCollider(Tile tile, int collisionGroup, int collidesWith, CollisionResponseType responseType=CollisionResponseType.Solid)
Initializes a new instance of the TileCollider class for the specified tile.
Represents an abstract base class for drawable tiles in the Gondwana engine. Provides core functional...
Definition Tile.cs:19
World-space axis-aligned collider used by the collision system.
Definition ICollider.cs:7
Represents an entity that participates in the collision system and has a defined collision area.
CollisionResponseType
Defines how a collider responds to collisions with other colliders.
Represents an axis-aligned bounding box (AABB) defined by its minimum and maximum coordinates along t...
Definition Aabb.cs:10
static Aabb FromRectangle(Rectangle r)
Creates an Aabb from a Rectangle.