Exemplo n.º 1
0
 def __init__(self):
     Character.__init__(self, [
         StaticAnimation(self,
                         'resources\\test_images\\characters\\cat.png')
     ])
     self.additional_firing_coordinates = Coordinates(25, 25)
     self.width = 50
     self.height = 50
Exemplo n.º 2
0
 def __init__(self, a, b):
     Block.__init__(self, [
         StaticAnimation(self,
                         'resources\\test_images\\grey.png',
                         Coordinates(a, b),
                         name='obstacle')
     ], a, b)
     self.args += [a, b]
Exemplo n.º 3
0
 def __init__(self):
     GameObject.__init__(self, [StaticAnimation(self, 'resources\\test_images\\spawn.png')])
     self.character = 'Kirito'
     self.type.append('writable')
     self.type.append('spawn')
     self.priority = 10
     self.width = 50
     self.height = 50
Exemplo n.º 4
0
 def __init__(self, coordinates, click_function, width, height):
     self.click_function = click_function
     Button.__init__(
         self,
         [StaticAnimation(self, 'resources\\test_images\\invisible.png')],
         [])
     self.width = width
     self.height = height
     self.coordinates = coordinates
 def __init__(self, a, b):
     Block.__init__(self, [
         StaticAnimation(self,
                         'resources\\test_images\\turquoise.png',
                         Coordinates(a, b),
                         name='obstacle')
     ], a, b)
     self.args += [a, b]
     self.type.append('shootable')
 def __init__(self):
     GravityField.__init__(self, [
         StaticAnimation(
             self, 'resources\\test_images\\normal_gravity_field.png')
     ], 8 * 10**13)
     self.center_of_gravity = Coordinates(12.5, 12.5)
     self.hitboxes = [Circle(self, self.center_of_gravity, 12.5)]
     self.width = 25
     self.height = 25
 def __init__(self):
     save = Label('SAVE', 30)
     save.coordinates = Coordinates(23, 17)
     Button.__init__(self, [
         StaticAnimation(
             self, 'resources\\test_images\\start_button_background.png')
     ], [save])
     self.width = 100
     self.height = 50
 def __init__(self):
     a = 50
     b = a
     Target.__init__(self, [
         StaticAnimation(self,
                         'resources\\test_images\\target.png',
                         Coordinates(a, b),
                         name='target')
     ])
     self.hitboxes = [Rectangle(self, Coordinates(0, 0), a, b)]
     self.width = a
     self.height = b
 def __init__(self,
              text,
              size,
              text_coordinates,
              coordinates,
              click_function,
              scale=Coordinates(1, 1)):
     lab = Label(text, size)
     lab.coordinates = text_coordinates
     self.click_function = click_function
     Button.__init__(self, [
         StaticAnimation(self,
                         'resources\\test_images\\menu_text_button.png')
     ], [lab])
     self.width = 100
     self.height = 50
     self.change_scale(scale)
     self.coordinates = coordinates
Exemplo n.º 10
0
 def __init__(self, path):
     GameObject.__init__(self, [StaticAnimation(self, path)])
     self.type.append('fixed')
     self.type.append('unstretchable')
     self.coordinates = Coordinates(0, 0)
     self.priority = 0
 def __init__(self, direction):
     starting_velocity = direction * NormalBullet.normal_velocity * constants.meter_to_pixel
     Projectile.__init__(self, [StaticAnimation(self, 'resources\\test_images\\bullet.png')], starting_velocity,
                         Coordinates(2.5, 2.5), 0.04)
     self.hitboxes = [Rectangle(self, Coordinates(0, 0), 5, 5)]
     self.hit_exceptions = [World.main_character]
 def __init__(self):
     GameObject.__init__(self, [StaticAnimation(self, 'resources\\test_images\\red.png'), Coordinates(5, 5)])
     self.priority = 100
     self.width = 5
     self.height = 5