예제 #1
0
	def onUpdate(self):
		self.locator.update()
		self.drawParam.dst = self.locator.position.makeRect(self.SIZE, True)
		self.drawParam.rotDegree = self.locator.speed.getAngle()
		
		force = Std.Vector2DF()
		force.setUnitVector(self.locator.speed.getAngle())
		force *= self.FORCE_TO_BULLET
		
		self.bulletDamage = self.BASE_BULLET_DAMAGE * self.damageRate
		damageSum = Auxs.applyDamageToBullets(
			self.hitRect, self.bulletDamage)
		self.applyDamage(damageSum * 2)
		rebound = Auxs.applyExForceToBullets(
			self.hitRect, force)
		self.applyExternalForce(rebound * 60)
		
		if self.locator.speed.getAbs() < 10:
			self.erase()
예제 #2
0
파일: Bomb.py 프로젝트: wtm4080/STGProject
	def applyDamageToEnemy(self):
		if self.baseDamage > 0:
			Auxs.applyDamageToEnemies(self.hitRect, self.damage)
			Auxs.applyDamageToBullets(self.hitCircle, self.damage)