Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(5)  |  Call(5)  |  Derive(0)  |  Import(0)

src/h/a/HackathonF2011-HEAD/src/Player.py   HackathonF2011(Download)
	def orient(self, mousePos):
		loc = mousePos - Vector2(self.getPos())
		angle = math.atan2(loc[1],loc[0])
		mag = math.fabs(angle)
 
		# Check to see if we have touched edge of the screen
		if self.rect.left < TILEX * 2:
			self.gameState.nextMap("left", self.getPos())
		elif self.rect.right > WIDTH - (TILEX*2):
			self.gameState.nextMap("right", self.getPos())
		elif self.rect.top < 0:
			self.gameState.nextMap("up", self.getPos())
		elif self.rect.bottom > HEIGHT:
			self.gameState.nextMap("down", self.getPos())