Пример #1
0
    def __init__(self, position):
        GameSprite.__init__(self, position)

        self.pieces = ""

        self.stitch_image(self.random_part_image("grip"),
                          self.random_part_image("magazine"),
                          self.random_part_image("barrel"))

        self.rect = pygame.Rect(position, self.image.get_size())

        self.flipped = False

        self.name = self.generate_name()

        self.speed = random.randint(1, 12)

        self.examine = [
            self.name,
            random.choice(TYPES),
            "Fire rate: {}".format(random.randint(120, 600)),
            "Bullet speed: {}m/s".format(self.speed)
        ]

        self.recoil = 0
        self.recoil_step = self.speed

        self.being_used = False

        self.original_image = self.image

        self.rotation = 0
Пример #2
0
 def __init__(self, perk, position):
     """
     :param item: base.Item instance perk to show
     :param position: world position to drop the perk
     """
     GameSprite.__init__(self, position)
     self.examine = perk.examine
     self.item = perk
     self.image = perk.original_icon
     self.rect.size = self.image.get_rect().size
     dropped_perks.append(self)
Пример #3
0
 def __init__(self, perk, position):
     """
     :param item: base.Item instance perk to show
     :param position: world position to drop the perk
     """
     GameSprite.__init__(self, position)
     self.examine = perk.examine
     self.item = perk
     self.image = perk.original_icon
     self.rect.size = self.image.get_rect().size
     dropped_perks.append(self)
Пример #4
0
 def __init__(self, position, texture):
     GameSprite.__init__(self, position)
     self.texture = texture
     self.update()
     self.is_particle = True
Пример #5
0
 def __init__(self, position):
     GameSprite.__init__(self, position)
     self.id = create_net_entity(self)
     self.last_pos = self.rect.topleft
     self.last_vel = self.velocity.tup
Пример #6
0
 def __init__(self, position, texture):
     GameSprite.__init__(self, position)
     self.texture = texture
     self.update()
     self.is_particle = True
Пример #7
0
 def __init__(self, position):
     GameSprite.__init__(self, position)
     self.id = create_net_entity(self)
     self.last_pos = self.rect.topleft
     self.last_vel = self.velocity.tup