Beispiel #1
0
def criarcenas():
    floresta = Cena(img=FLORESTA)
    castelo = Cena(img=CASTELO)
    floresta.direita = castelo

    alice = Elemento(img=ALICE,
                     tit="Alice",
                     style=dict(left="120px",
                                top="110px",
                                width="70px",
                                height="190px"))
    alice.entra(floresta)
    ealice = Texto(floresta, "Que floresta linda!")
    alice.vai = ealice.vai

    barbie = Elemento(img=BARBIE,
                      tit="Barbie",
                      style=dict(left="190px",
                                 top="60px",
                                 width="70px",
                                 height="160px"))
    barbie.entra(castelo)
    ebarbie = Texto(castelo, "Onde está o Ken?")
    barbie.vai = ebarbie.vai

    floresta.vai()
Beispiel #2
0
class Casa:
    CASA = {}

    def __init__(self, tabuleiro, nome='0_0', linha=0, coluna=0, lado="e"):
        inicio_x_ = inicio_x + offset[lado]
        self.nome = nome_elemento = "{}_{}".format(tabuleiro.nome, nome)
        self.elemento = Elemento(FUNDO,
                                 tit=nome_elemento + "_",
                                 style=dict(width=TBX - 15,
                                            height="{}px".format(TBY - 8),
                                            left=inicio_x_ - coluna * TBX -
                                            (TBX - 15),
                                            top=inicio_y + linha * TBY))
        self.tabuleiro = tabuleiro
        self.elemento.entra(tabuleiro.elemento)
        self.elemento.img.id = nome_elemento
        Casa.CASA[nome_elemento] = self

        self.elemento.elt.onclick = self.move_carta

    def local(self):
        return self.elemento.elt.style.left, self.elemento.elt.style.top

    def move_carta(self, casa):
        casa_destino = casa.target.id
        Carta.move_carta(self.tabuleiro, Casa.CASA[casa_destino])
Beispiel #3
0
        class LinhaGeracional:
            """Representa cada uma das linhas recortadas do herdograma original"""
            def __init__(self, posicao, index):
                ldx, ldy, lw, lh = dx, dy, w, h
                self.posicao = posicao  # posição original no topo da página
                self.index = index
                #posx = (lw//ldx) * (posicao % ldx)
                #posy = (lh//ldy) * (posicao // ldx)
                posx, posy = 100 * (index % ldx), 50 * (index // ldx)
                fw, fh = 100 * ldx, 50 * ldy
                sty = {
                    'background-position': '{}px {}px'.format(-posx, -posy),
                    'background-size': '{}px {}px'.format(fw, fh)
                }

                self.linha = Elemento(imagem,
                                      x=posicao * 150,
                                      y=30,
                                      w=100,
                                      h=50,
                                      style=sty)
                self.linha.entra(esta_cena)
                #alert(self.linha.pos)
                self.linha.vai = self.clica_e_posiciona_a_linha  #quando clica, monta o herdograma

            def zera(self):
                self.linha.x = self.posicao * 150  # posiciona cada peça com 200 pixels de distância
                self.linha.y = 30  # posiciona a peça no topo da página
                self.linha.vai = self.clica_e_posiciona_a_linha

            def clica_e_posiciona_a_linha(self, *_):
                x, y = posiciona_proxima(self.index)
                if y:  # se o y retornou zero é porque o posiciona próxima detectou montagem errada
                    self.linha.x, self.linha.y = x, y  # monta a linha no herdograma
                    self.linha.vai = lambda *_: None  #desativa o click da linha
Beispiel #4
0
def jogo():
    floresta =  Cena(img=FLORESTA)
    casa = Cena(img=CASA)
    floresta2 =  Cena(img=FLORESTA)
    floresta3 =  Cena(img=FLORESTA)
    pantano =  Cena(img=PANTANO)
    shopping =  Cena(img=SHOPPING)
    floresta.direita = casa
    casa.direita = floresta2
    floresta2.direita = floresta3
    floresta3.direita = pantano
    pantano.direita = shopping
    shopping.esquerda = pantano
    pantano.esquerda = floresta3
    floresta3.esquerda = floresta2
    floresta2.esquerda = casa
    casa.esquerda = floresta
    
    yoda = Elemento(img=YODA, tit="yoda", style=dict(left=50, 
    top=50, width=400, height="100px"))
    yoda.entra(floresta)
    cinderela = Elemento(img=CINDERELA, tit="cinderela", style=dict(left=400, 
    top=350, width=100, height="100px"))
    cinderela.entra(floresta)
    
    falacinderela = Texto(floresta, " Yoda, vamos tomar um chá?")
    cinderela.vai = falacinderela.vai
    
    falayoda = Texto(floresta, " Sim, muito obrigado pelo convite.")
    yoda.vai = falayoda.vai
    
    floresta.vai() 
Beispiel #5
0
 def make_piece(index):
     pc = Elemento(PECAS, x=0, y=0, w=60, h=60, cena=self.cena)
     pc.siz = (180, 180)
     dx, dy = 60 * (index // 3), 60 * (index % 3)
     pc.pos = (-dx, -dy)
     INV.bota(pc)
     return pc
Beispiel #6
0
    def __init__(self):
        '''Cria os Elementos principais que aparecerão na tela e seus lugares.
           
        '''
        self.inicio = Cena(TELA_INICIAL)
        self.pegadinha = Elemento(PEGADINHA,
                                  tit="PLAY",
                                  texto="Não é TOUCH",
                                  x=260,
                                  y=170,
                                  w=50,
                                  h=50,
                                  cena=self.inicio)
        self.solucao = Elemento(CLIQUE,
                                tit="MOUSE",
                                x=380,
                                y=285,
                                w=60,
                                h=60,
                                cena=self.inicio)
        '''O bind liga um evento a um método
           
           .. code-block:: python
              widget.bind(event, handler)
              
        '''

        self.solucao.elt.bind("click", self.chama)
Beispiel #7
0
class Persona_control:
    """ Cria um elemento que anda a partir do clique no joystick
    
        self.nome_do_elemento = Persona_control(variavel_personagem, nome_do_fundo, 
                                                h =100, w=100, x=10, y=430, movi= 10)
        
        :param variavel_personagem:Requisita o nome da variável que guarda o link do personagem
        :param nome_do_fundo: Insere o personagem em um fundo pré-criado
        :param h: Valor que define a altura do personagem. Por padrão é 100
        :param w: Valor que define a largura do persongem. Por padrão é 100
        :param x: Valor que define a posição do personagem no eixo x. Por padrão é 10
        :param y: Valor que define a posição do personagem no eixo y. Por padrão é 430
        :param movi: Determina a quantidade de movimento do personagem. Por padrão é 10
    """
    def __init__(self, variavel_personagem, nome_do_fundo, h =100, w=100, x=10, y=430, movi= 10):
        self.x = x # Diz que o x acima é nomeado como self.x abaixo
        self.y = y # Diz que o y acima é nomeado como self.y abaixo
        self.h = h # Diz que o h acima é nomeado como self.h abaixo
        self.w = w # Diz que o w acima é nomeado como self.w abaixo
        
        self.movi = movi # Diz que o movi acima é nomeado como self.movi abaixo
        #self.variavel_personagem = variavel_personagem 
        
        self.persona = Elemento(variavel_personagem, h=self.h , w=self.w, x=self.x, y=self.y) # Cria uma instância da classe elemento
        self.persona.entra(nome_do_fundo) # utiliza o método entra() da classe Elemento para não ter que criar um atributo cena para a classe persona_control 
        
        #self.persona.x = self.x > Deixar de stand by para futuras averiguações
        #self.persona.y = self.y > Deixar de stand by para futuras averiguações
          
        self.cima = Elemento(MARCADOR_CIMA, h=40 , w=40, x=780, y=450, vai=self.anda_cima) #cria um elemento posicionado 'acima' no joystick
        self.cima.entra(nome_do_fundo)
        
        self.baixo = Elemento(MARCADOR_BAIXO, h=40 , w=40, x=780, y=530, vai=self.anda_baixo) #cria um elemento posicionado 'abaixo' no joystick
        self.baixo.entra(nome_do_fundo)
        
        self.direita = Elemento(MARCADOR_DIREITA, h=40 , w=40, x=720, y=490,vai=self.anda_direita) #cria um elemento posicionado 'à direita' no joystick
        self.direita.entra(nome_do_fundo)
        
        self.esquerda = Elemento(MARCADOR_ESQUERDA, h=40 , w=40, x=840, y=490, vai=self.anda_esquerda) #cria um elemento posicionado 'à esquerda' no joystick
        self.esquerda.entra(nome_do_fundo)

    def anda_direita(self,*_):
        """Este método guarda a expressão de movimentação do elemento quando o botão 'direita' é clicado.
        """
        self.persona.x = self.x = self.x - self.movi
        
    def anda_esquerda(self,*_):
        """Este método guarda a expressão de movimentação do elemento quando o botão 'esquerda' é clicado.
        """
        self.persona.x = self.x = self.x + self.movi
        
    def anda_cima(self,*_):
        """Este método guarda a expressão de movimentação do elemento quando o botão 'em cima' é clicado.
        """
        self.persona.y = self.y = self.y - self.movi
        
    def anda_baixo(self,*_):
        """Este método guarda a expressão de movimentação do elemento quando o botão 'embaixo' é clicado.
        """
        self.persona.y = self.y = self.y + self.movi
Beispiel #8
0
class Cobra:
    def __init__(self, floresta_inicio):
        self.floresta_inicio = floresta_inicio
        self.fala = Texto(self.floresta_inicio, TEXTO_COBRA)
        self.cobra = Elemento(COBRA,
                              style=dict(left="800px",
                                         top="400px",
                                         width="150px"))
        if "antidoto" in INVENTARIO.item:
            INVENTARIO.item["antidoto"].vai = self.antidoto
        self.cobra.entra(floresta_inicio)
        self.cobra.vai = self.falacobra
        self.mordida = Elem(MORDIDA,
                            x=0,
                            y=0,
                            w=1400,
                            h=650,
                            style={"opacity": 0.5},
                            tipo="100% 100%")  #, vai=self.antidoto)

    def vai(self):
        self.floresta_inicio.vai()

    def falacobra(self, _):
        self.mordida.entra(self.floresta_inicio)
        self.fala.vai()

    def antidoto(self, _):
        self.mordida.entra(Cena())
        Texto(self.floresta_inicio, "Você toma o antídoto e fica curado").vai()
Beispiel #9
0
    def __init__(self):
        self.pulo = -10
        self.issun_top = 380
        _kamui = "https://i.imgur.com/R3pCA3a.jpg"
        _okami = "https://i.imgur.com/1jSbzEj.png"
        _issun = "https://i.imgur.com/lAYKq3F.png"
        self.kamui = Cena(_kamui)
        self.okami = Elemento(_okami,
                              cena=self.kamui,
                              tit="Essa é a Deusa Amaterasu")
        self.issun = Elemento(_issun,
                              cena=self.kamui,
                              style=dict(left=135,
                                         top=400,
                                         width=20,
                                         height="20px"),
                              tit="Issun - O artista intinerante")
        self.kamui.vai()

        def pula_issun(_=0, issun_=self.issun.elt.style):
            issun_.top = self.issun_top + self.pulo
            self.pulo = -self.pulo

        self.pula_issun = timer.set_interval(pula_issun, 300)

        def para_issun(_=0):
            Texto(self.kamui,
                  tit="Issun - O artista intinerante",
                  txt="Essa é a história da deusa Amaterasu").vai()
            timer.clear_interval(self.pula_issun)

        self.issun.vai = para_issun
Beispiel #10
0
 def __init__(self):
 
     self.fundo=Cena(FUNDO)
     self.imix = Elemento(CALEND["IMIX"], x=100, y=100, cena=self.fundo, vai=self.botao)
     self.ik = Elemento(CALEND["IK"], x=200, y=100, cena=self.fundo, vai=self.botao)
     self.ik.elt.onmouseenter = self.esconde
     self.ik.elt.onmouseleave = self.mostra
Beispiel #11
0
 def __init__(self):
     self.ft = Cena(img=FOTO_PAROQUIA)
     self.leao = Cena(img=LEAO)
     self.padre = Elemento(img=FLAVINHO)
     self.f_t = Cena(img=FOTO_PRINCIPAL)
     self.dalmacia = Cena(img=DALMACIA)
     self.j_j = Elemento(img=JERONIMO_JOVEM)
     self.ft_p = Cena(img=FUNDO_PERGUNTAS)
     self.batizado = Cena(img=BATIZADO_JERONIMO)
     self.roma = Cena(img=ROMA)
     self.ordenacao = Cena(img=ORDDENACAO_SACERDOTAL)
     self.sonho = Cena(img=SONHO)
     self.cr = Cena(img=CURIOSIDADE)
     self.caverna = Cena(img=CAVERNA)
     #self.pl = Elemento(img=PAPA_LIBERI
     self.pl = Cena(img=PAPA_LIBERIO)
     self.j_c = Cena(img=JERONIMO_CAVERNA)
     self.biblia = Cena(img=BIBLIA)
     self.vulgata = Cena(img=VULGATA)
     self.belem = Cena(img=BELEM)
     self.f_p = Cena(img=FOTO_DO_PADROEIRO)
     self.frase = Cena(img=FRASE)
     self.cf = Cena(img=CENA_FINAL)
     #self.pd = Elemento(img=PAPAD)
     self.pd = Cena(img=PAPAD)
     self.f_t.vai()
     self.entrou_padre()
Beispiel #12
0
 def __init__(self,source, width, height, top, left):
     Elemento.__init__(self,style=dict(position="absolute", top=top,left=left))
     video=html.VIDEO(width=width, height=height,autoplay=True, style=dict(position="absolute", top=top,
     left=left))
     video<=html.SOURCE(src=source)
     video.onclick = self._close
     self.elt<=video
Beispiel #13
0
def dogatthebeach():
    beach = Cena ("http://casadeluxoemcamboinhas.com.br/wp-content/uploads/2015/01/28506.jpg")
    funnydog = Elemento("http://www.instatube.com.br/wp-content/uploads/2015/08/pugs-mais-engracados-do-mundo-vi-480x293.jpg", tit = "FUNNYDOG",  style = dict(left = 150, top = 60, widht = 60, height = 200))
    txtfunnydog = Texto(beach,"Do you need dolly?")
    funnydog.entra(beach)
    funnydog.vai = txtfunnydog.vai
    beach.vai()
Beispiel #14
0
 def leste(self):
     Elemento(PROTEINA, tit="PROTEÍNA POLIPEPTíDIO", x= 400, y=200, w=200, h=300, cena =sala_a.leste,
     texto="Aqui no retículo rugoso se faz a montagem de proteínas compridas, formando cadeias polipeptídicas, em especial as que vão sair da célula")
     Elemento(MARIA, tit="MARIA", x= 700, y=200, w=200, h=300, cena =sala_a.leste,
     texto="Certo, as proteínas montadas que vão sair da célula serão enviadas para o complexo de Golgi para empacotamento")
     Elemento(SAIDA, tit="Saída, de volta a Citonópolis", x= 150, y=330, w=200, h=200, cena =sala_a.leste, vai=self.voltar)
     Elemento(MONTAGEM, x= 600, w=300, cena =sala_a.leste)
Beispiel #15
0
class Terra:
    def __init__(self, universo):
        self.universo = universo
        """
        self.fala = Texto(self.universo, TEXTO_FACA)
        self.falou = Texto(self.universo, FACA_FOI)
        self.usar = Texto(self.universo, FACA_USA)
        """
        self.terra = Elemento(TERRA,
                              style=dict(left="200px", width="80px"),
                              vai=self.pega)
        self.longe = Cena()
        self.na_mao = False
        self.terra.entra(self.universo)

    def pega(self, _):
        self.fala.vai()
        self.faca.vai = self.guarda

    def guarda(self, _):
        INVENTARIO.bota(self.faca)
        self.falou.vai()
        self.faca.vai = self.usa

    def chuta(self, _):
        self.faca.entra(self.longe)
        self.falou.vai()

    def usa(self, _):
        self.na_mao = True
        self.usar.vai()
Beispiel #16
0
 def outro_redemoinho(self):
     afala = 'De novo este redemoinho louco?'
     self.redemoinho = Elemento(CICLONE,
                                x=0,
                                y=0,
                                w=600,
                                h=600,
                                o=0.8,
                                cena=self.parede,
                                style={"transition": "left 6s"})
     self.redemoinho.elt.ontransitionend = Fase11
     self.redemoinho.entra(self.parede)
     self.maria.afala = afala
     self.maria.responde = self.anda_redemoinho
     self.maria_double = Elemento(
         img=MARIA,
         x=500,
         y=150,
         w=200,
         h=300,
         cena=self.parede,
         style={"transition": "left 6s, transform 1s"})
     self.redemoinho.entra(self.parede)
     self.maria.entra(self.parede)
     self.maria.fala()
Beispiel #17
0
 def __init__(self):
     floresta = Cena(FLORESTA)
     self.fantasma = Cena()
     floresta.vai()
     self.galhos = gag = Elemento(img=TRANSPARENTE,
                                  tit="galhos",
                                  style=dict(left=28,
                                             top=130,
                                             width=60,
                                             height="60px"))
     gag.entra(floresta)
     gag.vai = self.fogo_galhos
     self.pedra = aqua = Elemento(img=TRANSPARENTE,
                                  tit="pedras",
                                  style=dict(left=500,
                                             top=300,
                                             width=60,
                                             height="60px"))
     aqua.entra(floresta)
     aqua.vai = self.fogo_pedra
     self.oculos = ocu = Elemento(img=OCULOS,
                                  tit="OCULOS",
                                  style=dict(left=28,
                                             top=130,
                                             width=60,
                                             height="60px"))
     inv.bota(self.oculos)
     ocu.vai = self.fogo_oculos
Beispiel #18
0
 def entra_redemoinho(self, _=0):
     #from amanda.main import main
     afala = "Maria: Acho que finalmente conseguirei sair desse lugar."
     self.redemoinho = Elemento(CICLONE,
                                x=0,
                                y=0,
                                w=600,
                                h=600,
                                o=0.8,
                                cena=self.celula,
                                style={"transition": "left 6s"})
     self.redemoinho.elt.ontransitionend = self.main
     self.maria.afala = afala
     self.maria.responde = self.anda_redemoinho
     #self.maria.x = 600
     self.maria_double = Elemento(
         img=MARIA,
         x=500,
         y=150,
         w=200,
         h=300,
         cena=self.celula,
         style={"transition": "left 6s, transform 1s"})
     self.redemoinho.entra(self.celula)
     self.maria.entra(self.celula)
     self.maria.fala()
Beispiel #19
0
 def __init__(self, jogadores):
     self.rodada_corrente = 0
     self.interval = None
     Cena(SPLASH).vai()
     self.fases = [
         Cenario(IMGS["TEMPLOTRAS1"], 1),
         Cenario(IMGS["TEMPLOTRAS1"], 0),
         Cenario(IMGS["TEMPLOTRAS2"], 1),
         Cenario(IMGS["TEMPLOTRAS2"], 0),
         Cenario(IMGS["TEMPLOTRAS3"], 0, 800)
     ]
     self.mesa = self.fases[self.rodada_corrente]
     self.baralho = Baralho()
     # self.mesa = Cena(IMGS["TEMPLOTRAS3"])
     self.acampamento = Elemento("",
                                 style=dict(left=0,
                                            top=0,
                                            width=800,
                                            height="130px"))
     self.labirinto = Elemento("",
                               style=dict(left=0,
                                          top=140,
                                          width=800,
                                          height="400px"))
     self.acampamento.nome = "Acampa"
     self.labirinto.nome = "Explora"
     self.jogadores_ativos = self.jogadores = [
         Jogador(jogador, self) for jogador in jogadores
     ]
     self.perigo = self.salas = []
Beispiel #20
0
    def __init__(self, saida):
        self.saida = saida
        self.cena = cena = JOGO.c('https://i.imgur.com/ujAF00x.jpg').vai()
        fala = (
            "Atenção a dica. É uma estrutura que envolve a membrana plasmática"
            " e está presente em células vegetais, organismos procariotos e alguns eucariotos, como os fungos."
            " Tem como principal função, proteger a célula.")
        self.npc = Elemento(NPC,
                            x=600,
                            y=300,
                            w=200,
                            cena=cena,
                            texto=fala,
                            foi=self.maria_fala)
        vai = self.npc.vai
        self.npc.vai, self.npc_vai = self.nada, self.npc.vai

        def maria_fala(*_):
            self.npc.vai = self.npc_vai
            self.maria.vai, self.maria_vai = self.nada, self.maria.vai

        self.maria = Elemento(MARIA,
                              x=200,
                              y=150,
                              w=400,
                              h=500,
                              cena=cena,
                              texto="Oh! Não! Ainda estou presa.",
                              foi=maria_fala)
Beispiel #21
0
 def __init__(self, variavel_personagem, nome_do_fundo, h =100, w=100, x=10, y=430, movi= 10):
     self.x = x # Diz que o x acima é nomeado como self.x abaixo
     self.y = y # Diz que o y acima é nomeado como self.y abaixo
     self.h = h # Diz que o h acima é nomeado como self.h abaixo
     self.w = w # Diz que o w acima é nomeado como self.w abaixo
     
     self.movi = movi # Diz que o movi acima é nomeado como self.movi abaixo
     #self.variavel_personagem = variavel_personagem 
     
     self.persona = Elemento(variavel_personagem, h=self.h , w=self.w, x=self.x, y=self.y) # Cria uma instância da classe elemento
     self.persona.entra(nome_do_fundo) # utiliza o método entra() da classe Elemento para não ter que criar um atributo cena para a classe persona_control 
     
     #self.persona.x = self.x > Deixar de stand by para futuras averiguações
     #self.persona.y = self.y > Deixar de stand by para futuras averiguações
       
     self.cima = Elemento(MARCADOR_CIMA, h=40 , w=40, x=780, y=450, vai=self.anda_cima) #cria um elemento posicionado 'acima' no joystick
     self.cima.entra(nome_do_fundo)
     
     self.baixo = Elemento(MARCADOR_BAIXO, h=40 , w=40, x=780, y=530, vai=self.anda_baixo) #cria um elemento posicionado 'abaixo' no joystick
     self.baixo.entra(nome_do_fundo)
     
     self.direita = Elemento(MARCADOR_DIREITA, h=40 , w=40, x=720, y=490,vai=self.anda_direita) #cria um elemento posicionado 'à direita' no joystick
     self.direita.entra(nome_do_fundo)
     
     self.esquerda = Elemento(MARCADOR_ESQUERDA, h=40 , w=40, x=840, y=490, vai=self.anda_esquerda) #cria um elemento posicionado 'à esquerda' no joystick
     self.esquerda.entra(nome_do_fundo)
Beispiel #22
0
class TORDO():
    #def __ int __(self):
    festa = Cena(img=FESTA)
    gabinete = Cena(img=GABINETE)
    delegacia = Cena(img=DELEGACIA)
    cemiterio = Cena(img=CEMITERIO)
    delegado = Elemento(img=DELEGADO)
    mordomo = Elemento(img=MORDOMO)
    politico = Elemento(img=POLITICO)
    homem = Elemento(img=HOMEM)
    passista = Elemento(img=PASSISTA)
    lugar = Labirinto(n=GABINETE, l=FESTA, o=DELEGACIA, s=CEMITERIO)

    delegado.entra(lugar.norte)
    mordomo.entra(lugar.norte)
    politico.entra(lugar.norte)
    lugar.norte.vai()

    passista.entra(lugar.leste)
    mordomo.entra(lugar.leste)
    homem.entra(lugar.leste)
    lugar.leste.vai()

    homem.entra(lugar.oeste)
    lugar.oeste.vai()

    homem.entra(lugar.sul)
    mordomo.entra(lugar.sul)
    politico.entra(lugar.sul)
    delegado.entra(lugar.sul)
    lugar.sul.vai()
Beispiel #23
0
    def foi(self,opcao):
        self.bonequinha.a = self.cf [opcao]
        self.bonequinha.x = 200
        self.bonequinha.y = 620
        self.bonequinha.aparece()
        self.cf = dict(A = "(2,3)"
    def vai(self):
        self.fundo.vai()
               
class bonequinha():
    def __init__(self,fundo, opcao):
        self.x = 50
        self.c = 500
        self.a = opcao
        y = self.a*self.x+self.c
        self.boneca = Elemento(BONEQUINHA, h=250 , w=250, x=self.x, y=y)
        self.boneca.o = 0
        self.boneca.y = self.a*self.x+self.c
        self.boneca.x = self.x
        self.boneca.vai = self.equacao1
        self.boneca.entra(fundo)
        
    def aparece(self):
        self.boneca.o = 1
        
    def equacao1(self,*_):
        self.boneca.x = self.x = self.x +5.457
        self.boneca.y = self.a*self.x - self.c
        
    
if __name__ == "__main__":  
	inicialesquerda().vai()
        
Beispiel #24
0
class OI():
    #def _init_main (self)
    #ceni = Cena(img = CENI)
    #hospital = CE(img = HOSPITAL)
    lilita = Elemento(img=LILITA,
                      style=dict(left=100, top=150, width=200, height="150px"))
    #boneca.entra(ceni)
    sala1 = Cena(img=SALA1)
    sala2 = Cena(img=SALA2)
    sala3 = Cena(img=SALA3)
    sala4 = Cena(img=SALA4)
    self.ceu = ceu = Sala(n=SALA1, s=SALA2, o=SALA3, l=SALA4)

    boneca = Elemento(img=BONECA,
                      tit="Olá, eu sou o homem de ferro",
                      style=dict(left=100, top=150, width=200, height="150px"))
    boneca.entra(ceu.oeste)
    falaboneca = Texto(SALA3, "Hellou")
    boneca.vai = falaboneca.vai

    #ceni.entra(ceu.norte)
    #hospital.entra(ceu.leste)
    bilu = Elemento(img=BILU, tit="Olá, eu sou Bilu")
    bilu.entra(ceu.leste)
    falabilu = Texto(SALA4, "Olá")
    bilu.vai = falabilu.vai

    ana = Elemento(img=ANA)
    ana.entra(ceu.sul)
    falaana = Texto(ceu.sul, "HIII")
    falaana.vai()
    ana.vai = falaana.vai

    ceu.oeste.vai()
    ceu.vai()
Beispiel #25
0
    def sao_jeronimo(self, *_):
        def sonho(*_):
            Texto(self.sala.sul, "A devoção de São Jerônimo invade seu coração"
                  " e você entra em um sonho que ele teve com Jesus",
                  foi=self.o_sonho).vai()

        self.e_vecruz = Elemento(MARCA,
                                 x=640,
                                 y=150,
                                 w=90,
                                 h=180,
                                 o=0.1,
                                 cena=self.sala.sul,
                                 vai=sonho)
        self.e_vecruz.o = 0.2
        self.capel[1].vai()
        #self.e_vecruz.x, self.e_vecruz.y, self.e_vecruz.w, self.e_vecruz.h = 580, 150, 180, 60
        #self.e_vecruz.x = 640
        self.e_vecruz.vai = sonho
        busca = Texto(
            self.capel[1],
            "Visite a gruta e toque em um crucifixo sob um foco de luz",
            foi=lambda *_: self.e_vecruz.entra(self.sanct.norte))
        fala = Texto(
            self.capel[1],
            "Que bom você me visitar, aprenda meu caminho para santidade",
            foi=busca.vai)
        self.e_jerom.vai = fala.vai
        visao = Texto(
            self.capel[1],
            "Você se ajoelha e faz uma oração, São Jerônimo aparece numa visão",
            foi=lambda *_: self.e_jerom.entra(self.capel[1]))
        Texto(self.capel[1],
              "Você veio conhecer a gruta onde São Jerônimo traduziu a Bíblia",
              foi=visao.vai).vai()
Beispiel #26
0
class Inicial():
    """ Adiciona fundo, elemento e textos. 
    """
    def __init__(self):
        """ Criação do fundo e preparação da cena para cliques à direita, esquerda e meios."""
        #self.fundo = Cena(FUNDO, esquerda =inicialesquerda(), meio=Lago())
        self.fundo = Cena(FUNDO)
        """ Cria elemento da Cena. Adiciona nome ao elemento e texto."""
        self.livro = Elemento(LIVRO,
                              tit="LIVRO",
                              texto="Era uma vez...",
                              h=300,
                              w=300,
                              x=350,
                              y=250)
        """ Cria texto que é carregado junto da abertura da cena."""
        self.mais = Texto(self.fundo, txt="Teste!", foi=self.mostra_livro)

    def mostra_livro(self, *_):
        """Subordina o aparecimento do livro ao fechamento do texto de abertura"""
        self.livro.entra(self.fundo)

    def chama(self):
        """ Chama a Cena e o texto inicial"""
        self.fundo.vai()
        self.mais.vai()
Beispiel #27
0
    def tour(self):
        zezinho.entra(
            tour)  #zezinha volta para ver o quadros pois ficou encafifado
        rosalinda.entra(
            tour
        )  #recebe um telfonema e diz que zezinho pode ficar a vontade, mas ela tera que se ausentar

        zezinho.entra(
            quadros1
        )  #zezinho ajeita o quadro e quando irá arrumar outro quadro e ele está muito pesado, ao tirar da parde encontra um cofre
        #NAO ENTENDI A GAVETA COM LETRAS
        heredograma = Elemento(img=HEREDOGRAMA)  # ESTAR COMO UM QUADRO
        #LEMBROU DE UMA AULA NA FIO CRUZ
        #OLHOU NOVAMENTO NO COFRE E TINHA UMAS LETRAS EMBARALHAS
        #ABRIU O COFRE E PEGOU UM PAPEL

        zezinho.entra(pergaminho)
        #informações sobre o heredograma

        #o livro irá abrir para uma pagina secreta

        sala = Cena(img=SALA)
        quadrado = Elemento(img=QUADRADO)
        quadrado1 = Elemento(img=QUADRADO1)
        circulo = Elemento(img=CIRCULO)
        #dois_t = Elemento (img = DOIS_T)
        #FAZER COM QUE O JOGADOR POSSA MONTAR ESSE HEREDROGRAMA
        #COMADOS DE :ORGANIZE E MONTE
        # Rapidamente após de montar tudo, apareceu alguns nomes ao lado de cada desenho :
        #quadrado em branco - indivíduo do sexo masculino; esfera em branco - indivíduo do sexo feminino;
        # traço - casamento; quadrado com risco no meio - indivíduo falecido
        # DEPOIS DE MONTAR APARECEU A PALAVRA MAPA
        """APARECER UMA ABERTURA NA PAREDE"""
Beispiel #28
0
    def __init__(self,
                 universo,
                 left="300px",
                 top="300px",
                 icone=PESSOA,
                 itens=[]):
        def add(valor, num):
            return "{}px".format(int(valor[:-2]) + num)

        self.universo = universo
        """
        self.fala = Texto(self.universo, TEXTO_FACA)
        self.falou = Texto(self.universo, FACA_FOI)
        self.usar = Texto(self.universo, FACA_USA)
        """
        self.estacao = Elemento(ESTACAO,
                                style=dict(left=left, top=top, width="200px"),
                                vai=self.pega)
        self.icone = Elemento(icone,
                              style=dict(left=add(left, 50),
                                         top=add(top, 50),
                                         width="50px",
                                         height="50px"),
                              vai=self.pega)
        self.longe = Cena()
        self.na_mao = False
        self.estacao.entra(self.universo)
        self.icone.entra(self.universo)
Beispiel #29
0
    def __init__(self):
        self.laboratorio = Cena(img=LABORATORIO)

        def rosalinda_fala(_=0):
            rosalinda = (
                "Rosalinda: As proteínas são muito importantes, para a nossa saúde e beleza!"
                " Precismos estuda-las, para nos manter saudáveis, fortes e bonitas. "
            )
            Texto(self.laboratorio, rosalinda, foi=self.some).vai()

        fala = (
            'Maria: Oi,  Dr. Rosalinda sou sua fã, li todos os seus livros e seu artigo'
            ' sobre "Direcionamento de Proteínas", ou seja, como as proteínas percorrem toda a célula'
        )
        self.maria = Personagem(responde=rosalinda_fala, afala=fala)
        self.maria.entra(self.laboratorio)
        self.maria.fala()
        #self.maria=Elemento(img=MARIA, x=300, y=400, w=180, h=200, tit='oi,  Dr. Rosalinda sou sua fã, li todos os seus livros e seu artigo sobre "Direcionamento de Proteínas", ou seja, como as proteínas percorrem toda a célula')
        self.rosalinda = Elemento(
            img=ROSALINDA,
            x=100,
            y=400,
            w=180,
            h=200,
            tit=
            "as proteínas são muito importantes, para a nossa saúde e beleza! Precismos estuda-las, para nos manter saudáveis, fortes e bonitas. "
        )
        self.rosalinda.entra(self.laboratorio)
        self.laboratorio_1 = Cena(img=LABORATORIO_1)
        # self.laboratorio.direita=self.laboratorio_1
        self.laboratorio.direita = Cena(vai=self.some)
        self.laboratorio.vai()
Beispiel #30
0
class Banana:
    def __init__(self, floresta_inicio):
        self.floresta_inicio = floresta_inicio
        self.fala = Texto(self.floresta_inicio, TEXTO_BANANA)
        self.falou = Texto(self.floresta_inicio, BANANA_FOI)
        self.banana = Elemento(BANANA,
                               style=dict(left="230px", width="50px"),
                               vai=self.pega)
        self.longe = Cena()
        self.na_mao = False
        self.banana.entra(self.floresta_inicio)

    def pega(self, _):
        self.fala.vai()
        self.banana.vai = self.guarda

    def guarda(self, _):
        INVENTARIO.bota(self.banana)
        self.falou.vai()
        self.banana.vai = self.usa

    def come(self, _):
        self.banana.entra(self.longe)
        self.falou.vai()

    def usa(self, _):
        self.na_mao = True
        self.usar.vai()