コード例 #1
0
ファイル: game.py プロジェクト: ichpuchtli/Geometry-Genocide
	def accelerate(self):
		""" Overrides base method in system, to account for deathstars, enemy
			objects are attracted to the closest deathstart"""
			
		if Global.deathstars != []:
			closest_deathstar = sorted(Global.deathstars,key=
			lambda x:  abs(self.position-x.position))[0]
			self.direction = -(self.position-(closest_deathstar.position+self.displacer))
		Draw.accelerate(self)
コード例 #2
0
ファイル: game.py プロジェクト: ichpuchtli/Geometry-Genocide
	def accelerate(self):
		Draw.accelerate(self);