Tested the get_screen_center function.
This commit is contained in:
3
score.py
3
score.py
@@ -12,7 +12,8 @@ from state import BaseState, VALID_STATES
|
||||
class ScoreState(BaseState):
|
||||
def __init__(self):
|
||||
self.count = 0
|
||||
self.rectangle = pygame.Rect(250, 350, 100, 100)
|
||||
screen_center = self.get_screen_center()
|
||||
self.rectangle = pygame.Rect(screen_center[0] - 50, screen_center[1] - 50, 100, 100)
|
||||
self.next_transition = VALID_STATES['STAY']
|
||||
|
||||
def input(self):
|
||||
|
Reference in New Issue
Block a user