comparison demos/shooter/scripts/ships/enemies.py @ 472:3164715a0621

Added the FireBallBurst and FireBallSpread weapons which are now used by the boss. Added rotatePoint function.
author prock@33b003aa-7bff-0310-803a-e67f0ece8222
date Fri, 16 Apr 2010 21:44:18 +0000
parents 7a79dc2a0592
children 10aff123c62c
comparison
equal deleted inserted replaced
471:7a79dc2a0592 472:3164715a0621
203 self.weapon = FireBall(self._scene, self, 1000) 203 self.weapon = FireBall(self._scene, self, 1000)
204 self.weapon.projectilevelocity = 0.5 204 self.weapon.projectilevelocity = 0.5
205 205
206 self._actionlistener = BossActionListener(self) 206 self._actionlistener = BossActionListener(self)
207 207
208 self.hitpoints = 20 208 self.hitpoints = 30
209 self.scorevalue = 1000 209 self.scorevalue = 1000
210 210
211 def endLevel(self): 211 def endLevel(self):
212 self._scene.endLevel() 212 self._scene.endLevel()
213 213
224 224
225 225
226 def applyHit(self, hp): 226 def applyHit(self, hp):
227 self.flash(2) 227 self.flash(2)
228 super(Boss, self).applyHit(hp) 228 super(Boss, self).applyHit(hp)
229
230 if self.hitpoints == 20:
231 self.weapon = FireBallBurst(self._scene, self, 2000, 100, 10)
232
233 elif self.hitpoints == 10:
234 self.weapon = FireBallSpread(self._scene, self, 2000)
235