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()
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
def __init__(self, pos): self.image = gu.load_image('img/block.bmp') self.rect = pygame.Rect(pos, self.image.get_size())
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