Beispiel #1
0
	def __init__(self):
		self.initScreen()
		
		self.clock = pygame.time.Clock()

		pygame.font.init()

		self.font = os.path.join("resources","LiberationSans-Bold.ttf")

		self.text = pygame.font.Font(self.font, 16)
		self.text2 = pygame.font.Font(self.font, 42)
		self.text3 = pygame.font.Font(self.font, 32)
		self.text4 = pygame.font.Font(self.font, 12)

		self.messageBox = Messages.MessageBox()
		self.infoOverlay = Messages.InfoOverlay()

		if Settings.settings["Sound"]["enabled"]:
			self.sound = Sound.Sound(self)
		
		self.inGame = False
		
		self.mapSettings = Settings.getMapMetadata(Settings.settings["Rules"]["map"])

		self.mainMenu = Menus.MainMenu(self)
Beispiel #2
0
	def setMap(self, value, parameters):
		self.mapSettings = Settings.getMapMetadata(value[0])
		if self.mapSettings != None:
			Settings.settings["Rules"]["map"] = value[0]
		else:
			self.engine.messageBox.addMessage("Unable to load the selected map!")
Beispiel #3
0
	def init(self):
		self.maplist = []
		for map in Functions.getFolders("maps"):
			metadata = Settings.getMapMetadata(map)
			if metadata != None:
				self.maplist.append((map, metadata["name"]))