Tairitsu.Maps¶
Generate maps and blocks on a map.
Maps
¶
Classes¶
Block
¶
Block(image: pygame.Surface, x=0, y=0, width=SceneSettings.tileWidth, height=SceneSettings.tileHeight)
Bases: pygame.sprite.Sprite
A block in the map
| PARAMETER | DESCRIPTION |
|---|---|
image |
The image of the block.
TYPE:
|
x |
The x coordinate of the block.
TYPE:
|
y |
The y coordinate of the block.
TYPE:
|
width |
The width of the block.
TYPE:
|
height |
The height of the block.
TYPE:
|
Source code in Tairitsu/Maps.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | |
Attributes¶
image
instance-attribute
¶
image = pygame.transform.scale(image, (SceneSettings.tileWidth, SceneSettings.tileHeight))
Functions¶
draw
¶
draw(window: pygame.surface, dx=0, dy=0)
draw the block on the window
Source code in Tairitsu/Maps.py
27 28 29 30 31 | |