Kraken Logo

Kraken Engine

DocumentationGuidesShowcaseCommunity
Ctrl
K
Navigating the Docs
Building Docs
Overview
Anchor
AnimationController
Audio
Batcher
Body
Camera
Capsule
CastHit
CharacterBody
Circle
Collision
Color
DistanceJoint
Effect
Event
FilterJoint
Flip (Texture)
Font
ImageLayer
InputAction
Joint
Layer
Line
Map
MapObject
Mask
MotorJoint
MouseJoint
ObjectGroup
Orchestrator
PixelArray
PolarCoordinate
Polygon
PrismaticJoint
Rect
RevoluteJoint
RigidBody
Sample
Sampler
Shader
SheetStrip
StaticBody
Stream
Style
Terrain (TileSet)
Text
TextProperties
Texture
Tile (TileLayer)
Tile (TileSet)
TileLayer
TileResult (TileLayer)
TileSet
Timer
Transform
Tween
Vec2
Vertex
WeldJoint
WheelJoint
World

Built bydurkisneer1.Kraken Engine is open source and available onGitHub.

  1. Docs
  2. Classes
  3. Tile Layer

TileLayer

TileLayer represents a grid of tiles within the map. Access via the 'tilemap' submodule.

Inherits from Layer.

Properties


NameDescriptionType
opacityLayer opacity from 0.0 to 1.0.float
tilesTileLayerTileList of tiles in the layer grid.TileLayer.TileLayerTileList

Methods


Get From Area

get_from_area(area: Rect) → list[TileLayer.TileResult]get_from_area(area: Rect) → list[TileLayer.TileResult]

Return tiles intersecting a Rect area.

Args

  • area : World-space area to query.

Returns

list[TileLayer.TileResult] : List of TileResult entries for tiles intersecting the area.

Get From Point

get_from_point(position: Vec2) → objectget_from_point(position: Vec2) → object

Return the tile at a given world position.

Args

  • position : World-space position to query.

Returns

Optional[TileLayer.TileResult] : TileResult entry if a tile exists at the position, None otherwise.

Draw

draw(angle: float = 0.0, pivot: Vec2 = ...) → Nonedraw(angle: float = 0.0, pivot: Vec2 = ...) → None

Draw the tile layer.

Args

  • angle : Rotation angle in degrees. Defaults to 0.0.
  • pivot : Rotation pivot as normalized coordinates relative to the map size. Defaults to (0.5, 0.5).
PreviousTile (TileSet)
NextTileResult (TileLayer)

On this page

PropertiesMethodsGet From AreaGet From PointDraw