예제 #1
0
    def __init__(self):
        self.cena = cena = Cena(CENA)
        self.casa = Predio(PRED, cena=cena)
        self.casa.entra(self.cena)
        
        self.base0 = Plataforma(BASE, y=200, cena=cena)
        self.base1 = Plataforma(BASE, y=440, cena=cena)
        self.base0.destino, self.base1.destino = self.base1, self.base0 
        
        self.cesta = Veiculo(CEST, destino=self.base1, cena=self.base0)
        self.cesta2 = Veiculo(CEST, destino= self.base0, cena= self.base1, x=300)
        self.cesta.outro, self.cesta2.outro = self.cesta2.outro, self.cesta.outro
        
        self.doggie = Personagem(DOG, destino=self.cesta.fundo, cena=cena)
        self.menina = Personagem2(GIRL, destino=self.cesta.fundo, cena=cena)
        self.menino = Personagem3(BOY, destino=self.cesta.fundo, cena=cena)

        cena.vai()
예제 #2
0
    def __init__(self):
        self.cena = cena = Cena(CENA)
        self.casa = Predio(PRED, cena=cena)
        self.casa.entra(self.cena)
        
        self.base0 = Plataforma(BASE, y=200, cena=cena)
        self.base1 = Plataforma(BASE, y=440, cena=cena)
        self.base0.destino, self.base1.destino = self.base1, self.base0 
        
        self.cesta = Veiculo(CEST, destino=self.base1, cena=self.base0)
        self.cesta2 = Veiculo(CEST, destino= self.base0, cena= self.base1, x=300)
        #self.cesta.outro, self.cesta2.outro = self.cesta2.outro, self.cesta.outro
        
        self.dogie = Personagem(DOG, destino=self.cesta.fundo, cena=cena,tit = "10kg" ,x=570,y=150, w=80, h=50)
        self.menina = Personagem(GIRL, destino=self.cesta.fundo, cena=cena, tit = "20kg", x=650, y=120, w=60, h=80)
        self.menino = Personagem(BOY, destino=self.cesta.fundo, cena=cena, tit = "40kg", x=710, y=100, w=60, h=100)

        cena.vai()
예제 #3
0
 def __init__(self):
     self.theus = Elemento(img=MATHEUS)
     self.calice = Elemento(img=CALICE) 
     self.ambula = Elemento(img=AMBULA)
     self.patena = Elemento(img=PATENA)
     self.galheta = Elemento(img=GALHETA)
     self.jarro = Elemento(img=JARRO_BACIA_MANUSTERGIO)
     self.sanguineo = Elemento(img=SANGUINEO)
     self.corporal = Elemento(img=CORPORAL)
     self.pala = Elemento(img=PALA)
     self.paroquia = Cena(img=PAROQUIA)
     self.altar = Cena(img=ALTAR)
     self.igreja = Cena(img=IGREJA_VELHA)
     self.presbiterio = Cena(img=PRESBITERIO)
     self.fim = Cena(img=FINAL)
     self.paroquia.vai()
     self.entrou_theus()
예제 #4
0
class revista1():
    def __init__(self):
        self.escola = Cena(img=ESCOLA)

        Texto(
            self.escola,
            "Num futuro distante, um grupo de amigos estudavam e se divertiam juntos e além disso,  tinham poderes especiais, entretanto por conta de uma pandemia, toda a população humana foi obrigada a viver em isolamento."
            "Após dois anos de confinamento a vacina foi descoberta, após a vacinação em massa,"
            "os estudantes voltaram a se encontrar. Os amigos, que moravam mais perto da Mata Atlântica, na cidade de São Paulo,"
            "começaram a perceber o sumiço de alguns animais, e se reuniram para desvendar esse mistério!"
        ).vai()
        self.escola.vai()
        self.lily = Elemento(img=LILY, x=220, y=400, w=100, h=200)
        self.nena = Elemento(img=NENA, x=120, y=400, w=100, h=200)
        self.perola = Elemento(img=PEROLA, x=320, y=400, w=100, h=200)
        self.jackson = Elemento(img=JACKSON, x=420, y=400, w=120, h=220)
        self.leila = Elemento(img=LEILA, x=520, y=400, w=100, h=200)
        self.lily.entra(self.escola)
        self.nena.entra(self.escola)
        self.perola.entra(self.escola)
        self.jackson.entra(self.escola)
        self.leila.entra(self.escola)
        self.escola.direita = Cena(vai=self.amem)

    def amem(self):
        self.mata = Cena(img=MATA)
        inventario(cena=self.mata)
        self.mata.vai()
        Texto(
            self.mata,
            "caracteristicas dos personagens , click para descobrir seu personagem"
        ).vai()
        self.mata.esquerda = self.escola
        self.escola.direita = self.mata
        self.mata.esquerda = self.escola
        self.nena.entra(self.mata)
        self.nena.tit = "Olá eu sou a Nena, eu amo cuidar do planeta, sou organixa e monitoro tudo, por isso que eu trouxe uma bússula"
        self.perola.entra(self.mata)
        self.perola.tit = "Olá,eu sou a Pérola,eu sou bastante forte e sou da equipe de resgate do meu bairro, por isso eu trouxe o kit de primeiros socorros"
        self.lily.entra(self.mata)
        self.lily.tit = "Olá eu sou a Lily Raquel, eu sou bem otimista e desbravadora, por isso trouxe um facão"
        self.jackson.entra(self.mata)
        self.jackson.tit = "Olá eu sou o Jackson,me colocaram como líder do grupo,pois sou muito corajoso e bom em defesa, estou levando um mapa e corda "
        self.leila.entra(self.mata)
        self.leila.tit = " olá eu sou a leila, sou bem quieta e discreta, me pediram para trazer o fogo"
        # self.mata.entra=Elemento(vai=self.personagem)

        Texto(self.mata, ).vai()
        self.leila.entra(self.mata)

        self.escola.vai()
예제 #5
0
    def _vai_geo():
        TRIG.sul.meio.vai = _foi_geo
        _vai = Cena(TIRINHA_DO_CLAUDEMILSON)

        def redir():
            _vai.vai = _foi_geo

        historia = Cena(TIRINHA_DO_CLAUDEMILSON, _vai, _vai, _vai)
        texto = """Then when he stay house, he sit on the sofa,and turn on the TV and saw the following head line:
  - Manifestation on the street Dr. poop my pants.
 The manifestation is happening behind her house, and have peoples whif plates, turning down bus and screaming:
   - Became Robervald, became Claudemilson, became Robervald Claudemilson!!!!!!!!!!!!!!!
  He tired of all Claudemilson's and decide go sleep.
  Then he wake up at morning, and cout to her daddy and his mother of the crazy nightmare he has, and sit to turn on the TV and saw:
  - has a manifestation here the peoples are screaming: BECAME CLAUDEMILSON!!!!!!!!!!!!!!"""
        _vai.vai = Texto(historia, '', texto, foi=redir).vai
        historia.vai()
예제 #6
0
파일: main.py 프로젝트: kwarwp/evelyn
def criarcenas():
    laboratorio = Cena(img=LABORATORIO)
    laboratorioa = Cena(img=LABORATORIO)
    maravilhas = Cena(img=MARAVILHAS)
    fim = Cena(img=FIM)
    laboratorio.direita = laboratorioa

    cinderela1 = Elemento(img=CINDERELA,
                          tit="Cinderela",
                          style=dict(left="100px",
                                     top="150px",
                                     width="130px",
                                     height="220px"))
    cinderela2 = Elemento(img=CINDERELA,
                          tit="Cinderela",
                          style=dict(left="200px",
                                     top="150px",
                                     width="130px",
                                     height="220px"))
    cinderela3 = Elemento(img=CINDERELA,
                          tit="Cinderela",
                          style=dict(left="100px",
                                     top="150px",
                                     width="130px",
                                     height="220px"))
    cinderela1.entra(laboratorio)

    cinderela2.entra(laboratorioa)
    homemaranha = Elemento(img=HOMEMARANHA,
                           tit="homem aranha",
                           style=dict(left="20px",
                                      top="80px",
                                      width="130px",
                                      height="220px"))
    homemaranha.entra(laboratorioa)
    ehomemaranha = Texto(
        laboratorioa,
        "Por favor, doutora, preciso da sua ajuda, é urgente. Sofri uma mutação, e os meus poderes estão se voltando contra mim, preciso de um antidoto"
    )
    homemaranha.vai = ehomemaranha.vai
    laboratorio.vai()
예제 #7
0
def criarcenas(): 
    selva = Cena(img=SELVA) 
    mesa = Cena(img=MESA)
    selva.direita = mesa
    mesa.esquerda = selva
    
    tarzan = Elemento(img=TARZAN_NA_SELVA, tit="Tarzan", style=dict(left="50px", top="40px", width="150px", heigth="150px"))
    tarzan.entra(selva)
    etarzan = Texto (selva, "Tarzan, que foi criado na selva, quando chega na idade adulta, por conhecer a selva muito bem e se achar o rei dela se perde na floresta.")
    tarzan.vai = etarzan.vai
    
    tarzan = Elemento(img=TARZAN_EM_PE, tit="Tarzan", style=dict(right="50px", top="50px", width="50px", heighth="50px"))
    alice = Elemento(img=ALICE, tit="Alice", style=dict(left="100px", top="100px", widht="100px", height="100px"))
    tarzan.entra(mesa)
    alice.entra(mesa)
    ealice = Texto (mesa, "Você veio do pântano?")
    etarzan = Texto (mesa, "Não, eu vim da selva. Me perdi tentando encontrar minha cinderela")
    alice.vai = ealice.vai
    tarzan.vai = etarzan.vai
    
    selva.vai()
예제 #8
0
파일: main.py 프로젝트: kwarwp/vera
 def __init__(self, universo, menu, 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, x=left, y=top, w=300, h=240, vai=self.pega)
     self.icone = Elemento(icone, style=dict(left=add(left,55),
         top=add(top,85), width="400px", height="40px"), vai=self.pega)
     self.janela = Elemento(JANELA, style=dict(left=add(left,50), top=add(top,80), width="500px", height="50px"), vai=self.pega)
     self.longe = Cena()
     self.na_mao = False
     self.estacao.entra(self.universo)
     self.janela.entra(self.universo)
     self.icone.entra(self.universo)
     self.menu =menu
예제 #9
0
파일: main.py 프로젝트: kwarwp/grete
    def _vai_room23():
        ROOM.sul.meio = Cena(vai=_gone_room23)  #vai = _foi_room23
        _vai = Cena(TIRINHA_DO_CLAUDEMILSON)

        def redir():
            _vai.vai = _gone_room23

        historia = Cena(TIRINHA_DO_CLAUDEMILSON, _vai, _vai, _vai)
        texto = """The Lunch Kiddo!---Cleison passes through the corridor but then he sees the classroom 23.
The boy enters it and sees a different room: there is something missing! Cleison
looks at the little door beside the board written 'Become Robervald'.'Become Claudemilson'.
He walks to the little door and he opens it: Its the janitor's room, weird! Cleison starts sneezing
all over the place, because it was too dirty. At the same time that  he was walking around, he was also blowing the dust away, 
so he could find his old locker, it was written 'Lunch Kiddo'. A tear fell from his eye. He remembered 
Elianildes, an old canteen employee, and his friend too. After so much sentimentality, he heard a
noise inside the locker next to his; he opened it and seen an afraid puppy. He called him 'Sadboy',
even though it was excited to see him! They were playing, when they heared a deafening sound of footsteps on the 
floor. Sadboy ran away and Cleison was alone and without any choice, when suddenly...
"""
        _vai.vai = Texto(historia, '', texto, foi=redir).vai
        historia.vai()
예제 #10
0
파일: main.py 프로젝트: kwarwp/ada
 def mostradia(self, ev=0):
     fake = Cena()
     fake.vai = self.elevador
     dia = Cena(FUNDODIA, direita=fake)
     dia.vai()
     self.bil = Elemento(BILHETE,
                         x=200,
                         y=20,
                         w=900,
                         h=600,
                         cena=dia,
                         vai=self.elevador)
     self.boton = Elemento(BOTAO,
                           x=820,
                           y=470,
                           w=70,
                           h=70,
                           cena=dia,
                           vai=self.elevador)
예제 #11
0
    def __init__(self):
        self.c11 = Cena(FUNDO_CENA1)
        self.c12 = Cena(FUNDO_CENA2)

        self.c21 = Cena(FUNDO_CENA5)
        self.c22 = Cena(FUNDO_CENA6)

        self.c31 = Cena(FUNDO_CENA11)
        self.c32 = Cena(FUNDO_CENA12)
        self.c33 = Cena(FUNDO_CENA13)

        self.cenas = [
            self.c11, self.c12, self.c21, self.c22, self.c31, self.c32,
            self.c33
        ]
        self.bonequinha = 0
        self.itens = []
        self.ind_cenas = 0
        self.pos_carga = 0
예제 #12
0
    def _go_principalsroom():
        principalsroom_.sul.meio.vai = _gone_principalsroom
        _vai = Cena(TIRINHA_PRINCIPALS_ROOM)
        def redir():
            _vai.vai = _gone_principalsroom
        historia = Cena(TIRINHA_PRINCIPALS_ROOM, _vai, _vai, _vai)
        texto = """Cleison goes to the principal's room--
Cleison hears someone calling him. He did not know who it was. He lookes and sees a woman wearing a t-shirt with the words : 'Become Claudemilson'. 
She says:
-Go to the Principal's room!!!!
In that moment he remembered that whe he was a student there the name of the principal was George. He was cool.
He did not understand anything, only followed the woman. In the principal's room, she said
-You will have to listen to a rap and a funk of the dictatorship of Claudemilson and eat raw noodles!!!
Out of nowhere, a sound started to beat: Become Claudemilson.
While Claudemilson was distracted, Claison escaped.
When he ran away, he got into his car and speeded desperately, but a traffic policeman stopped him. Meanwhile, Claudemilson had time to reach him. She began to shout with Cleison. Back at school an inspector that passed nearby decided to enter the school .He saw that Claudemilson tortured the children, and she was arrested.
""" 
        _vai.vai = Texto(historia, '', texto, foi=redir).vai
        historia.vai()
예제 #13
0
파일: main.py 프로젝트: kwarwp/lorinda
    def some(self, ev=0):
        def sumir(ev=0):
            self.rosalinda.x = -100000

        self.laboratorio_1.vai()
        self.laboratorio_1.esquerda = self.laboratorio
        self.rosalinda.entra(self.laboratorio_1)
        fala_rosalinda = "sim claro"
        self.rosalinda.vai = Texto(self.laboratorio_1,
                                   fala_rosalinda,
                                   foi=sumir).vai
        #self.elt.onclick = some
        self.maria.entra(self.laboratorio_1)
        maria_texto = (
            "Maria: Sim, elas são importantes. Então quer dizer que se eu não me alimentar bem,"
            " posso ter cabelos, unhas e pele feias?")
        self.maria.fala(self.laboratorio_1,
                        responde=self.parte_2,
                        texto=maria_texto)
        self.rosalinda.tit = ""
        self.laboratorio_1.direita = Cena(vai=self.parte_2)
예제 #14
0
파일: main.py 프로젝트: kwarwp/evelyn
def criarcenas():
    casa = Cena(img=CASA)
    casapordentro = Cena(img=CASAPORDENTRO)
    casa.direita = casapordentro

    tarzan = Elemento(img=TARZAN,
                      tit="Tarzan",
                      style=dict(left="100px",
                                 top="100px",
                                 width="130px",
                                 height="220px"))
    tarzan.entra(casapordentro)
    etarzan = Texto(casapordentro, "Onde estou? Essa não é minha casa!")
    tarzan.vai = etarzan.vai

    casa.vai()
예제 #15
0
파일: main.py 프로젝트: kwarwp/eva
 def __init__(self):
     cidade = Cena(CIDADE)
     outra = Cena(OUTRA)
     cidade.direita = outra
     outra.esquerda = cidade
     #texto.vai()
     #cidade.vai()
     sala = Sala(CIDADE, OUTRA, EOUTRA, MSOUTRA)
     cara = Elemento(CARA,
                     cena=sala.norte,
                     style=dict(width=40, height="40px", left=100, top=100))
     cara.vai = self.vai_cara
     self.texto = Texto(sala.norte, "olá mundo")
     self.texto.foi = self.foi_texto
     self.texto_foi = Texto(sala.norte, "Tudo bem?")
     sala.norte.vai()
예제 #16
0
    def __init__(self):
        self.QUARTO = Cena(imagem_quarto)
        #self.PERSONAGEM_DORMINDO= Elemento(imagem_personagem1, tit="Acorde",
                             #w=600,h=300,  x=450, y=300, # ou x=eixo_x, y=eixo_y, w=largura, h=altura
                             #cena = self.cena1)
                     
        self.QUARTO2= Cena(imagem_quarto2)        
        
        self.LIVRO= Elemento(imagem_livro, tit="É esse!",
                             w=55,h=58, x=850, y=390, # ou x=eixo_x, y=eixo_y, w=largura, h=altura
                             cena = self.QUARTO2)
                             
        self.LIVROERRADO= Elemento(imagem_livroerrado, tit="Acho que não é esse...",
                             w=55,h=58, x=500, y=390, # ou x=eixo_x, y=eixo_y, w=largura, h=altura
                             cena = self.QUARTO2)     
                             
        self.BONECA2= Elemento(imagem_boneca2, tit="Acho que encontrei meu livro!",
                             w=300,h=420, x=200, y=200, # ou x=eixo_x, y=eixo_y, w=largura, h=altura
                             cena = self.QUARTO2)    
        
        self.LIVRO.elt.bind("click", self.funcao_de_acao_do_botao)  
        
        self.LIVROERRADO.elt.bind("click", self.livro_errado)  
        
        self.SETA = Elemento(seta, tit="Próximo",
                             w=55,h=58, x=900, y=420,
                             cena = self.QUARTO)
                             
        self.BONECA1 = Elemento(imagem_boneca1, tit="Onde pode estar meu livro?",
                             w=300,h=420, x=600, y=200,
                             cena = self.QUARTO)  
                             
        self.texto_3 = Texto(self.QUARTO, txt = "Hipátia gosta de ler seu livro quando acorda. Mas, nessa manhã, não o encontrou em sua mesa e resolveu procurar no closet. Estranho...")
                             
        self.SETA.elt.bind("click", self.funcao_de_acao_do_botao3)  
        
        self.texto_1 = Texto(self.QUARTO2, txt = 'Hipátia, encontre o livro')
        
        self.cena2= Cena(imagem_livroaberto)
        
        self.texto_2= Texto(self.cena2, txt= 'Hipátia encontrou uma mensagem estranha em seu livro, aperte o PLAY para decifrá-la')
        
        self.BOTAO_DESAFIO1= Elemento(botao_desafio1, tit="PLAY",
                                      w=55,h=58, x=610, y=300, # ou x=eixo_x, y=eixo_y, w=largura, h=altura
                                      cena = self.cena2)

        self.BOTAO_DESAFIO1.elt.bind("click", self.desafio1)
예제 #17
0
    def __init__(self):
        #Cria Cenas
        self.c11 = Cena(FUNDO_CENA1)
        self.c12 = Cena(FUNDO_CENA2)
        self.c13 = Cena(FUNDO_CENA3)
        self.c14 = Cena(FUNDO_CENA4)

        self.c21 = Cena(FUNDO_CENA5)
        self.c22 = Cena(FUNDO_CENA6)
        self.c23 = Cena(FUNDO_CENA7)
        
        self.cenas = [self.c11, self.c12, self.c13, self.c14, self.c21, self.c22, self.c23]
        #Criação das variáveis globais
        self.bonequinha = 0
        #Lista de itens para cada cena
        self.itens = []
        #Indíce para indicar a cena em que a personagem está no momento
        self.ind_cenas= 0
        #Variável para auxiliar o 'aumento' da bateria
        self.pos_carga = 0
예제 #18
0
def gruta(_=0):
    """Você tem um 'def' (função) para cada cena, esta aqui faz a cena da gruta"""
    global cenaIlha
    cena_gruta = Cena(img=linkGruta1)

    rat1 = Elemento(img=linkRat1, tit="Rat godess", y=300, x=170, h=400, w=400)
    rat1.entra(cena_gruta)
    txtrat1 = Texto(
        cena_gruta,
        "afie minha espada mas por um porem prove sue valor completando ésa missão."
    )
    rat1.vai = txtrat1.vai
    ark2 = Elemento(img=linkArk2, tit="Ark", y=350, x=830, h=100, w=100)
    ark2.entra(cena_gruta)
    ark2.vai = cenaIlha.vai
    cenaIlha = Cena(img="https://i.imgur.com/5UvVC5M.png")
    cenaIlha.meio = cena_gruta
    okami1 = Elemento(img=linkOkami1, tit="Okami", y=400, x=170, h=200, w=200)
    okami1.entra(cena_gruta)
    cena_gruta.vai()
예제 #19
0
파일: main.py 프로젝트: kwarwp/adele
def Historia():
    cenaPraia = Cena(PRAIA)
    elementoEstrela = Elemento(img=ESTRELA,
                               tit="Estrela do mar",
                               style=dict(left=12, width=60, height=48))
    elementoConcha = Elemento(img=CONCHA,
                              tit="Concha",
                              style=dict(left=65,
                                         top=210,
                                         bottom=50,
                                         width=35,
                                         height=10))
    elementoEstrela.entra(cenaPraia)
    elementoConcha.entra(cenaPraia)
    cenaMar = Cena(MAR, direita=cenaPraia)
    cenaPraia.esquerda = cenaMar
    cenaPraia.vai()
예제 #20
0
 def game_over(self, time=0):
     c = Cena(RUBISH).vai()
     Elemento("https://i.imgur.com/DVOvsGI.png",
              tit=f"turnos = {TheHero().turn}",
              x=200,
              y=200,
              w=900,
              h=400,
              cena=c)
     gatos = len(self.cats)
     causa = " no desastre global" if time else " de fome"
     gatinhos = {
         0: "morreu",
         1: " e um gatinho morreram",
         2: f" e {gatos} gatinhos morreram"
     }
     texto = (
         f"Total de pontos: {self.xper}. Você alcançou o nível {self.levl} em {self.turn} turnos."
         +
         f"Você resgatou {len(self.kept)} gatinhos. Você {gatinhos[min(2, gatos)]}"
         + causa)
     Texto(c, texto).vai()
     INV.inicia()
예제 #21
0
def teorias():
    inicio = Cena(img=NEWTON)
    inicio_t = Texto(inicio, "A gravidade da situação está em tornar tudo um material de consumo")
    iluminatti = Texto (inicio, "Ahhh mas disso você já sabia!")
    inicio_e = Elemento (img = MACA, tit="Gravidade", style = dict(left= 70,top=170, width=50, height=200,bottom=100))
    #personagem = Elemento (img = linkpersonagem, tit="garotinho", style = dict(left= 150, top=100, width=60, height=200))
    lado1 = Cena(img=GALILEU, direita =inicio)
    lado1_e = Elemento(img=ILUMINATTI, tit='O universo não gira em torno de você não,bb', style = dict(left= 150, top=240, width=40, height=200, bottom=100))
    iluminatti = Texto (inicio, "Ahhh mas disso você já sabia!")
    
    inicio_e.entra(inicio)
    inicio_e.vai = inicio_t.vai
    #inicio.vai = inicio_tt.vai
    inicio.esquerda = lado1
    lado1_e.vai = iluminatti.vai
    lado1_e.entra(lado1)
    
    inicio.vai()
예제 #22
0
파일: main.py 프로젝트: kwarwp/lorinda
 def some (self):
     def sumir(ev=0):
         self.rosalinda.x=-100000
     def maria_falou(*_):
         rose_fala = ("Elas tem inúmeras funções. Tem função estrutural,"
         "pois são os constituintes básicos das fibras musculares, cabelo, ossos, dentes e pele."
         " Também desempenham importante papel na proteção do organismo contra os agentes patológicos,"
         " é o caso dos anticorpos; na constituição de hormônios importantes para o bom funcionamento do organismo,"
         " em especial, a insulina, o FSH e o LH; na aceleração das reações químicas que acontecem no organismo.")
         self.rosalinda.vai = Texto(self.laboratorio_1, rose_fala, foi=sumir).vai
     texto=" Quais as funções delas no nosso organismo?" 
     self.maria=Elemento(img=MARIA, x=100, y=280, w=280, h=300, texto=texto, foi=maria_falou)
     def rosa_falou(*_):
         self.maria.vai = vai
     vai = self.maria.vai
     self.maria.vai = lambda *_: None
     self.laboratorio_1.vai()
     # self.laboratorio_1.esquerda=self.laboratorio
     self.rosalinda.entra(self.laboratorio_1)
     fala_rosalinda = "Sim, claro!"
     self.rosalinda.vai = Texto(self.laboratorio_1, fala_rosalinda, foi=rosa_falou).vai
     #self.elt.onclick = some
     self.maria.entra(self.laboratorio_1)
     self.laboratorio_1.direita=Cena(vai=self.parte_2)
예제 #23
0
def criarcenas():
    pantano = Cena(img=PANTANO)
    castelo = Cena(img=CASTELO)
    cidade = Cena(img=CIDADE)

    pantano.vai()

    alice.direita = vai()
    alice = Elemento(img=ALICE,
                     tit="Alice",
                     style=dict(left=150, top=150, width=60, height=200))
    alice.entra(pantano)
    alice.vai = ealice.vai
    tarzan.vai()
    tarzan = Elemento(img=TARZAN,
                      tit="Tarzan",
                      style=dict(left=50, top=150, width=60, height=200))
    tarzan.entra(pantano)
    tarzan.vai = etarzan.vai
예제 #24
0
def Historia():
    INVENTARIO.inicia()
    cenaMaracana = Cena(MARACANA)
    elementoFlamengo = Elemento(img=FLAMENGO, 
                       tit="Torcida do Flamengo",
                       style=dict(left=150, width=60, heigth=70))
    elementoBola = Elemento(img=BOLA,
                       tit="Bola"
                       style=dict(left=100, widht=40, height=50))
    elementoFlamengo.entra(cenaMaracana)
    elementoBola.entra(cenaMaracana)
    def botainventario():
        INVENTARIO.bota(elementoBola)
    txtflamengo = Texto(cenaMaracana, "Vamos Flamengo", foi=botainventario)
    elementoFlamengo.vai =txtflamengo.vai
    cenaBAR = Cena(BAR, direita=cenaMaracana)
    cenaMaracana.esquerda = cenaBAR
    
    cenaMaracana.vai()
예제 #25
0
파일: main.py 프로젝트: kwarwp/evelyn
def criarcenas():
    floresta = Cena(img=FLORESTA)
    central_park = Cena(img=CENTRAL_PARK)
    floresta.direita = central_park
    
    barbie = Elemento(img=BARBIE, tit="Barbie", style=dict(left="150px", top="300px", width="90px", height="300px"))
    barbie.entra(floresta) 
    ebarbie = Texto(floresta, "Que horror, essa floresta se mexendo e zumbindo!")
    barbie.vai = ebarbie.vai
    tarzan = Elemento(img=TARZAN, tit="Tarzan", style= dict(left="430px", top="50px", width="250px", height="300px"))
    tarzan.entra(floresta)
    ebarbie = Texto(floresta, "Socorro, você pode me ajudar? Estou com medo")
    
    floresta.vai()
    
    central_park = Cena(img=CENTRAL_PARK)
    
    homem_aranha = Elemento(img=HOMEM_ARANHA, tit="Homem-Aranha", style=dict(left="100px", top="200px", width="60px", height="200px"))
    homem_aranha.entra(central_park)
    cinderela = Elemento(img=CINDERELA, tit="Cinderela", style=dict(left="150px", top="160px", width="60px"))
    cinderela.entra(central_park)
    ehomem_aranha = Texto(central_park, "Ei, Cinderela, você ouviu este grito de socorro? Sabe o que está acontecendo?")
    ecinderela = Texto(central_park, "SIM, me ajude! É minha amiga Barbie, ela está perdida na parte assombrada.")
예제 #26
0
def geometria():
    fundogeo = Cena(img=fundo)

    square = Elemento(img=quadrado,
                      tit="Adivinhe quem eu sou?",
                      style=dict(top=300, left=300, hight=300, width=300))
    square.entra(fundogeo)
    textosquare = Texto(fundogeo, "RETÂNGULO")
    square.vai = textosquare.vai

    fundogeo.vai()

    log = Elemento(img=losango3d,
                   tit="Adivinhe quem eu sou?",
                   style=dict(top=100, left=500, hight=300, width=300))
    log.entra(fundogeo)
    textolog = Texto(fundogeo, "LOSANGO")
    log.vai = textolog.vai

    fundogeo.vai()
예제 #27
0
파일: main.py 프로젝트: kwarwp/dame
def oi():
    mar = Cena(img=Mar)
    vulcao = Cena(img=Vulcao)
    mar_esquerda = Vulcao
    vulcao.direita = Mar
    bart_Simpson = Elemento(img=Bart_Simpson,
                            tit="Oi, eu sou o Bart!",
                            style=dict(left=150, top=60, width=60, height=200))
    bart_Simpson.entra(mar)
    falaBart = Texto(
        mar,
        "E aí, estamos nas Ilhas Maldivas! Nem sei como consegui parar aqui.")
    furia_da_Noite = Elemento(img=Furia_da_Noite,
                              tit="Olá, sou o Furia da Noite",
                              style=dict(left=150,
                                         top=60,
                                         width=60,
                                         height=200))
    furia_da_Noite.entra(vulcao)
    falaFuria = Texto(
        vulcao,
        "Estou animado pra poder sobrevoar e ver o que acontece lá dentro!")
    mar.vai()
    falaBart.vai()
예제 #28
0
def Historia():
    INVENTARIO.inicia()
    cenaArgentina = Cena(ARGENTINA)
    elementoTango = Elemento(img=TANGO,
                             tit="Casal",
                             style=dict(left=180,
                                        top=30,
                                        width='120px',
                                        height='260px'))
    elementoTango.entra(cenaArgentina)

    def botainventario():
        INVENTARIO.bota(elementoTango)

    txttango = Texto(cenaArgentina,
                     "Quem dança seus males espanta!",
                     foi=botainventario)
    elementoTango.vai = txttango.vai
    cenaSamba = Cena(SAMBA, direita=cenaArgentina)
    cenaArgentina.esquerda = cenaSamba
    cenaArgentina.vai()
예제 #29
0
파일: main.py 프로젝트: kwarwp/ida
def criarcenas():
    cidade =Cena(img=CIDADE)
    pantano =Cena(img=PANTANO)
    cidade.direita = pantano
    
    homem_aranha =Elemento(img= HOMEM_ARANHA, tit="Homem_aranha", style=dict(left=150, top=120, width=60, height=200))
    homem_aranha.entra(cidade)
    lata_de_lixo =Elemento(img= LATA_DE_LIXO, tit="Lata_de_lixo", style=dict(right=150, top=220, width=30, height="20px"))
    lata_de_lixo.entra(cidade)
    falalata_de_lixo = Texto(cidade, "num fim de tarde, incidentes misteriosos alarmavam a cidade")
    lata_de_lixo.vai=falalata_de_lixo.vai
    homem_aranha1 =Elemento(img= HOMEM_ARANHA1, tit="Homem_aranha1", style=dict(left=150, top=120, width=60, height="20px"))
    homem_aranha1.entra(pantano)
    falahomem_aranha1 = Texto(pantano, "que estranho!")
    tarzan =Elemento(img= TARZAN, tit="Tarzan", style=dict(right=150, top=120, width=60, height="20px"))
    tarzan.entra(pantano)
    falatarzan = Texto(pantano, "OoOoOoOoooo por aqui tudo corre bem")
    sapo =Elemento(img= SAPO, tit="sapo", style=dict(left=50, top=120, width=60, height="20px"))
    sapo.entra(pantano)
    falasapo = Texto(pantano, "Homem aranha vai investigar num pantano próximo quando se depara com Tarzan. Ao ver que não havia nada suspeito no local, começa a desconfiar que o inimigo esteja mais próximo do que imaginava")
    
    cidade.vai()
예제 #30
0
파일: hotel.py 프로젝트: kwarwp/patricia
class Game:
    # referência para o Elemento
    previous_selected_card = None
    
    cena = Cena()
    
    def vai(self): 
        self.create_2x2_cards()
    
    def create_2x2_cards(self):
        """ 
            matrix 2x3:
            1A 1B 
            2A 2B
           
        """
        list_cards = self.shuffle_cards()
        
        self.card1a = Card("PyCharm", IMG_CARD_1, list_cards[0], Game.cena, Game.rule)
        self.card1b = Card("PyCharm", IMG_CARD_1, list_cards[1], Game.cena, Game.rule)
        
        self.card2a = Card("Linux", IMG_CARD_2, list_cards[2], Game.cena, Game.rule)
        self.card2b = Card("Linux", IMG_CARD_2, list_cards[3], Game.cena, Game.rule)
        
        #self.card3a = Card("GitLab", IMG_CARD_3, list_cards[4], Game.cena, Game.rule)
        #self.card3b = Card("GitLab", IMG_CARD_3, list_cards[5], Game.cena, Game.rule)
        
        #self.card4a = Card("GitHub", IMG_CARD_4, list_cards[6], Game.cena, Game.rule)
        #self.card4b = Card("GitHub", IMG_CARD_4, list_cards[7], Game.cena, Game.rule)
        
        #self.card5a = Card("Activ", IMG_CARD_5, list_cards[8], Game.cena, Game.rule)
        #self.card5b = Card("Activ", IMG_CARD_5, list_cards[9], Game.cena, Game.rule)
        
        Game.cena.vai()

    @staticmethod
    def rule(selected_card):
    
        # abortar se o clique ocorrer sobre a mesma carta
        if Game.previous_selected_card == selected_card:
            return
        
        # tem um par selecionado?
        if Game.previous_selected_card is None:
            # primeira carta selecionada
            Game.previous_selected_card = selected_card
            # desabilita o clique sobre carta virada
            Game.previous_selected_card.card.elt.unbind("click")
            return
        
        # Não acertou
        if Game.previous_selected_card.name != selected_card.name:            
            

            # Aqui tem q esperar pelo menos 3 segundos, como fazer? (sleep, não funciona)
      
            #Texto(Game.cena, "Opa!", "Errou!!!").vai()
            
            # reabilita a ação o clique e vira a carta 1 para baixo
            Game.previous_selected_card.card.elt.bind("click", Game.previous_selected_card.turnUp)
            # reabilita a ação do clique e vira a carta 2 para baixo
            selected_card.card.elt.bind("click", selected_card.turnUp)
            selected_card.turnDown()
            Game.previous_selected_card.turnDown()
            Game.previous_selected_card = None
            
        # acertou 
        else:
            # desabilita o clique sobre as cartas acertadas
            Game.previous_selected_card = None
            selected_card.card.elt.unbind("click")
            #Texto(Game.cena, "Acertou!!!").vai()
        

    def shuffle_cards(self):   
        list_cards =  [(0,0), (1,0),(0,1),(1,1)]
        random.shuffle(list_cards)
        return list_cards