mirror of
https://github.com/sourabhv/FlapPyBird.git
synced 2024-11-25 16:35:52 +08:00
Rename welcome message sprite
This commit is contained in:
parent
35ecd4465e
commit
879c386d09
@ -4,11 +4,10 @@ from .entity import Entity
|
||||
|
||||
class WelcomeMessage(Entity):
|
||||
def __init__(self, config: GameConfig) -> None:
|
||||
image = config.images.welcome_message
|
||||
super().__init__(
|
||||
config=config,
|
||||
image=config.images.message,
|
||||
x=int(
|
||||
(config.window.width - config.images.message.get_width()) / 2
|
||||
),
|
||||
image=image,
|
||||
x=(config.window.width - image.get_width()) // 2,
|
||||
y=int(config.window.height * 0.12),
|
||||
)
|
||||
|
@ -9,7 +9,7 @@ from .constants import BACKGROUNDS, PIPES, PLAYERS
|
||||
class Images:
|
||||
numbers: List[pygame.Surface]
|
||||
game_over: pygame.Surface
|
||||
message: pygame.Surface
|
||||
welcome_message: pygame.Surface
|
||||
base: pygame.Surface
|
||||
background: pygame.Surface
|
||||
player: Tuple[pygame.Surface]
|
||||
@ -27,8 +27,8 @@ class Images:
|
||||
self.game_over = pygame.image.load(
|
||||
"assets/sprites/gameover.png"
|
||||
).convert_alpha()
|
||||
# message sprite for welcome screen
|
||||
self.message = pygame.image.load(
|
||||
# welcome_message sprite for welcome screen
|
||||
self.welcome_message = pygame.image.load(
|
||||
"assets/sprites/message.png"
|
||||
).convert_alpha()
|
||||
# base (ground) sprite
|
||||
|
Loading…
Reference in New Issue
Block a user