示例#1
0
	def generateProjectile(self, pos):
		shotLifeLength = 200
		shotSpeed = 1
		attack = Attack.Attack("shot.png", self.game, pos, (4,4))
		attack.damage = 5
		attack.velocity = VectorMath.normalize(VectorMath.sub
				(self.game.player.getMidPos(),self.getMidPos()),shotSpeed)
		attack.framesToLive = shotLifeLength
		return attack
示例#2
0
	def distanceToPoint(self, point):
		return VectorMath.magnitude((VectorMath.sub(self.pos,point)))