Exemplo n.º 1
0
	def __init__(self):
		self.main_settings = Settings()
		self.screen = self.main_settings.screen

		self.image = pygame.image.load('Images/Play_Button.bmp')

		self.rect = self.image.get_rect()
		self.screen_rect = self.screen.get_rect()

		self.rect.center = (500, 400)
Exemplo n.º 2
0
	def __init__(self):
		self.main_settings = Settings()
		self.screen = self.main_settings.screen

		self.font = pygame.font.SysFont(None, 18)
		self.credits = "MUSIC: https://www.bensound.com"

		self.rendered_font = self.font.render(self.credits, True, (255, 255, 255))
		self.rf_rect = self.rendered_font.get_rect()
		self.rf_rect.center = (110, 690)
Exemplo n.º 3
0
import pygame
from pygame.sprite import Sprite

from MainSettings import Settings
from level import Level
from walls_and_floors import *

main_settings = Settings()


class Level7(Level):
    """Creates all the walls and floors for the level"""
    def __init__(self):

        super().__init__()

        #List of the different walls in the form [x, y, width, height, color]
        walls = [[0, 675, 1000, 25, self.color.NEARBLACK],
                 [200, 525, 800, 25, self.color.NEARBLACK]]

        self.lvl_text = "I need that torch"
        self.lvl_text_image = self.font.render(self.lvl_text, True,
                                               self.color.LIGHTGRAY)
        self.text_location = (100, 50)

        for item in walls:
            wall = Wall(item[0], item[1], item[2], item[3], item[4])
            self.wall_list.add(wall)