コード例 #1
0
ファイル: darkness.py プロジェクト: borntyping-sandbox/misc
class Darkness ():
	def __init__ (self, run = False):
		"""	Initialise the game """
		self.ui = UserInterface()

		# Run the game once initialisation is complete
		if run: self.run()

	def run (self):
		"""	Run the event loop """
		while 1:
			for event in pygame.event.get():
				if event.type == pygame.QUIT:
					return
			self.ui.draw()
コード例 #2
0
ファイル: darkness.py プロジェクト: borntyping-sandbox/misc
	def __init__ (self, run = False):
		"""	Initialise the game """
		self.ui = UserInterface()

		# Run the game once initialisation is complete
		if run: self.run()