Ejemplo n.º 1
0
 def __init__(self, app):
     Activity.__init__(self, app)
     # self.cat = MySprite(self.surf)
     # self.cat.load("assets/test.png", 100, 100, 4)
     # self.group = pygame.sprite.Group()
     # self.group.add(self.cat)
     # self.cat.position = (100,100,100,100)
     self.pics = []
     self.texts = []
     state = self.app.activityData['state']
     if 'pics' in state:
         for pic in state['pics']:
             content = eval(pic['content'])
             if isinstance(content,tuple):
                 self.pics.append(content)
             else:
                 position = eval(pic['position'])
                 size = eval(pic['size'])
                 self.pics.append(self.getPicture(content, size, position))
     if 'texts' in state:
         for text in state['texts']:
             color = BLACK
             size = FONT_NORMAL
             if 'color' in text : color = eval(text['color'])
             if 'size' in text : size = eval(text['size'])
             t = self.getText(text=text['content'], size=size, position=eval(text['position']), color=color)
             self.texts.append(t)
Ejemplo n.º 2
0
    def __init__(self, app):
        Activity.__init__(self, app)
        self.state = START
        self.conf = None
        self.start()

        self.stopShow = True
        self.stopThread = False
        self.image_thread()
        self.time_thread()
Ejemplo n.º 3
0
 def __init__(self, app):
     Activity.__init__(self, app)
     self.state = CATGAME_INIT
     self.initBricks()