Skip to content

Commit 725197f

Browse files
author
youssif-sully
committed
update
1 parent c03a7cb commit 725197f

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

rect_pygame.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Rect in pygame
2+
3+
## Images (like the mario below) and shapes (pygame.Surfaces) don't have "positions"
4+
5+
![Mario](mario.png)
6+
7+
## Using get_rect() method creates rect (rectangular) with the size of the image/shape in the x, y coordinates (0, 0) (see the image below)
8+
9+
![Game flow](rects_pygame.png)
10+
11+
## now the rect can be "interacted" with (move, collision etc.) by either the x, y coordinates or by using top, center, etc. (as shown in the image above)

0 commit comments

Comments
 (0)