def __init__(self, screen):
     Frame.__init__(self, screen, (300, 110), (20, 20))
     self.l1 = Label(self, "Velocidad inicial", position=(30, 10))
     self.t1 = TextBox(self, (160, 10))
     self.l2 = Label(self, "Ángulo", position=(30, 40))
     self.t2 = TextBox(self, (160, 40))
     self.textboxes = {'angle': self.t2, 'v_0': self.t1}
예제 #2
0
class IntroGameState(GameState):

	__textbox = None
	__gamestatemanager = None

	def __init__(self, name, gamestatemanager):
		self.__gamestatemanager = gamestatemanager
		try:
			introText = open("Text Dialogue and Intro/Story intro.txt").read()
		except:
			introText = "Langes Intro..."
		introConversation = Conversation(introText,[])
		okAnswer = Answer("Beginne dein Abenteuer...", IntroGameState.startGame, [self])
		introConversation.addAnswer(okAnswer)
		self.__textbox = TextBox(introConversation)

	def startGame(self):
		self.__gamestatemanager.changeGameState("INGAME")

	def display2D(self, delta):
		self.__textbox.display2D(delta)

	def update(self, delta):
		self.__textbox.update(delta)

	def keyboardup(self, key, x, y):
		GameState.keyboardup(self, key, x, y)
		self.__textbox.keyboardup(key, x, y)

	def mouseClick(self, button, state, x, y):
		if not self.__textbox.mouseClick(button, state, x, y):
			self.startGame()
예제 #3
0
	def __init__(self, name, gamestatemanager):
		self.__gamestatemanager = gamestatemanager
		try:
			introText = open("Text Dialogue and Intro/Story intro.txt").read()
		except:
			introText = "Langes Intro..."
		introConversation = Conversation(introText,[])
		okAnswer = Answer("Beginne dein Abenteuer...", IntroGameState.startGame, [self])
		introConversation.addAnswer(okAnswer)
		self.__textbox = TextBox(introConversation)