Beispiel #1
0
    def _init__(self):
        self.screen = gu.init((600, 300), 'Joystick test')
        self.mychar = gu.load_image('img/char.bmp', -1)
        self.myrect = self.mychar.get_rect()

        self.joy = Joystick(0)

        self.clock = pygame.time.Clock()

        self.main()
Beispiel #2
0
 def __init__(self, pos=(0, 0)):
     Sprite.__init__(self)
     self.image = gu.load_image("img/block.bmp", -1)
     self.rect = self.image.get_rect()
     self.rect.topleft = pos
     self.movepow = 2
Beispiel #3
0
 def __init__(self, pos):
     self.image = gu.load_image('img/block.bmp')
     self.rect = pygame.Rect(pos, self.image.get_size())
Beispiel #4
0
 def __init__(self, pos = (0, 0)):
     Sprite.__init__(self)
     self.image = gu.load_image('img/player.bmp', -1)
     self.rect = self.image.get_rect()
     self.rect.topleft = pos