self._level.remove_enemy(enemy)
self._enemies.remove(enemy)
- def _fire_bullet(self, bullet, pos, dp):
+ def _fire_bullet(self, bullet, pos, dp, angle):
if len(self._bullets) >= 10:
return
bullet.game_pos = pos
bullet.game_dp = dp
bullet.dt = 0
bullet.level_layer = self._level_layer
+ bullet.angle = angle
self._bullets.add(bullet)
def _check_for_bullet_hits(self):
weapon.play_sound()
if weapon.bullet_range > 0:
self._fire_bullet(
- weapon.assemble_bullet(), self._player_pos, self._angle_dp)
+ weapon.assemble_bullet(), self._player_pos, self._angle_dp,
+ self._angle)
else:
# melee
pos, dp = self._player_pos, self._angle_dp
from pygame.surface import Surface
from pygame.draw import circle
from pgzero.loaders import images, sounds
-from .actors.anim import AnimatedSurfActor
+from .actors.animsurf import AnimatedSurfActor
from .util import safepath