MCPcopy Create free account
hub / github.com/Mrinank-Bhowmick/python-beginner-projects / Cursor

Class Cursor

projects/PONG/main.py:168–177  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

166
167
168class Cursor(pygame.sprite.Sprite):
169 def __init__(self) -> None:
170 super().__init__()
171 self.cursor_image = pygame.image.load("assets/cursor.png")
172 self.cursor = pygame.transform.scale(self.cursor_image, (27, 27))
173 self.cursor_rect = self.cursor.get_rect()
174
175 def update(self):
176 self.cursor_rect.topleft = pygame.mouse.get_pos()
177 WIN.blit(self.cursor, self.cursor_rect)
178
179
180class Options:

Callers 1

main.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected