コード例 #1
0
ファイル: item.py プロジェクト: Spferical/Fleeing-the-Fray
 def use(self, user, direction=None):
     if direction is None:
         direction = ui.pick_direction()
         # if player exitted out if pick_direction or something:
         # just quit
         if direction is None:
             return False
     user.mana -= self.mana_use
     (dx, dy) = direction
     pos = (user.x, user.y)
     bullet = mob.Bullet(pos, self.damage, self.color, dx, dy)
     terrain.map.objects.append(bullet)
     return True