def __init__(self): self.trilha = trilhacaverna = Cena(TRILHACAVERNA) INVENTARIO.inicia() #trilhacaverna.vai() aranha = Elemento(ARANHA, cena=trilhacaverna, x=400, y=150, w=200, h=200) cobra = Elemento(COBRA, cena=trilhacaverna, x=800, y=450, w=400, h=200) setadireita = Elemento(SETADIREITA, cena=trilhacaverna, x=1100, y=450, w=200, h=100) setaesquerda = Elemento(SETAESQUERDA, cena=trilhacaverna, x=30, y=480, w=100, h=100) setadireita.vai = self.dir_vai setaesquerda.vai = cavernaamigo.vai chave = Elemento(CHAVE, cena=trilhacaverna, tit="chave", drag=True, x=500, y=450, w=100, h=50) chave.vai = lambda *_: INVENTARIO.bota(chave)
def __init__(self, congresso): # tem que passar o congresso aqui #self.foi,congresso.sul.vai=congresso.SALA4.vai,self.vai -XXX- o certo seria congresso.sul.vai, optei por algo uniforme self.aqui = aqui = congresso.sul self.foi, self.aqui.vai = self.aqui.vai, self.vai self.c = Elemento( img="https://i.imgur.com/bO9jojz.png", tit= "Como vocês já me conhecem e percebi que quando duas pessoas se conhecem elas começam a se adaptar umas as outras fazendo com que seu DNA mude por transmissão de pensamento", style=dict(left=50, top=350, width=400, height="200px"), vai=self.errou) self.b = Elemento( img="https://i.imgur.com/94lhgKo.png", tit= "OIe eu sou o Carlo e sei que quando um ser vivo(seres humanos, plantas etc) fica exposto a radiação ou algum produto químico por muito tempo pode ocorre mutação no DNA da pessoa fazendo com que a pessoa tenha alguma doença ou passe para os seus filho", style=dict( left=400, top=350, width=300, height="200px", ), vai=self.acertou) self.a = Elemento( img="https://i.imgur.com/Oo1sn9s.png", tit= "OIii sou a Letícia e descobri que quando se come maçã estragada isso pode modificar seu DNA pelas proteínas e enzimas que soltam no seu estômago passam para o sangue e vão até o núcleo das células alterando a sintese de proteínas do corpo", style=dict(left=700, top=350, width=400, height="200px"), vai=self.errou) self.a.entra(congresso.sul) self.b.entra(congresso.sul) self.c.entra(congresso.sul)
def __init__(self, congresso): # -XXX- tem que passar o congresso aqui # self.foi,congresso.oeste.vai=congresso.SALA3.vai,self.vai self.aqui = aqui = congresso.oeste self.foi, self.aqui.vai = self.aqui.vai, self.vai self.c = Elemento( img=GABI, tit= "Oiiii, meu nome é Gabi e estou estudando sobre cruzamento de genes e vi que se uma pessoa te AA e outra Aa então seus futuros filhos serão 50% AA e 50% Aa", style=dict(left=50, top=350, width=400, height="200px"), vai=self.acertou) self.b = Elemento( img="https://i.imgur.com/Q5PcxvC.png", tit= "Aqui é a Tássia e vamos agilizando porque eu não tenho tempo,pois o tempo é evolução e eu preciso me modificar para me adaptar", style=dict( left=400, top=350, width=300, height="200px", ), vai=self.errou) self.a = Elemento( img="https://i.imgur.com/bO9jojz.png", tit= "Coé lek. Meu nome é Alan e eu sei que se eu tenho várias tatuagens meus futuros filhos nasceram tatuados", style=dict(left=700, top=350, width=400, height="200px"), vai=self.errou) self.a.entra(congresso.oeste) self.b.entra(congresso.oeste) self.c.entra(congresso.oeste)
def __init__(self, congresso): # tem que passar o congresso aqui #self.foi,congresso.sul.vai=congresso.SALA2.vai,self.vai self.aqui = aqui = congresso.leste self.foi, self.aqui.vai = self.aqui.vai, self.vai self.c = Elemento( img="https://i.imgur.com/MUrxyGb.png", tit= "Tassia sou eu e digo que as borboletas são adaptadas ao ambiente, quanto mais poluído o ambiente mais cinza", style=dict(left=50, top=350, width=400, height="200px"), vai=self.errou) self.b = Elemento( img="https://i.imgur.com/Oo1sn9s.png", tit= "As borboletas dos países frios são menos coloridas do que o Brasil pois não pegam sol.", style=dict( left=400, top=350, width=300, height="200px", ), vai=self.errou) self.a = Elemento( img="https://i.imgur.com/bO9jojz.png", tit= "descobri que as borboletas podem sofrer mutações sobre alguma dessas fases e não chegar até o ultimo estágio ou morrer antes mesmo de completar a vida adulta", style=dict(left=700, top=350, width=400, height="200px"), vai=self.acertou) self.a.entra(congresso.leste) self.b.entra(congresso.leste) self.c.entra(congresso.leste)
def abre(self): left, top, u = self.left, self.top, self.universo self.menudepessoas = Elemento(MENUDEPESSOAS[0], x=left -170, y=top +50, w=60, h=60, vai=self.pega,cena=self.universo) self.menudepessoas = Elemento(MENUDEPESSOAS[1], x=left +30, y=top +50, w=60, h=60, vai=self.pega,cena=self.universo) self.menudepessoas = Elemento(MENUDEPESSOAS[2], x=left -40, y=top +50, w=60, h=60, vai=self.pega,cena=self.universo) self.menudepessoas = Elemento(MENUDEPESSOAS[3], x=left -260, y=top +50, w=80, h=80, vai=self.pega,cena=self.universo) self.menudepessoas = Elemento(MENUDEPESSOAS[4], x=left -110, y=top +50, w=60, h=60, vai=self.pega,cena=self.universo) self.longe = Cena() self.na_mao = False
def __init__(self, esquerda=None): # floresta_leao = FlorestaLeao() -XX- ERRO! self.floresta_inicio = None floresta_leao = CenaProxy(self.floresta_inicio) esquerda = esquerda or floresta_leao self.floresta_inicio = Cena(FLORESTA, esquerda=esquerda, direita=floresta_leao) floresta_leao.aqui = self.floresta_inicio faca = Faca(self.floresta_inicio) self.lanterna = Elemento (LANTERNA,tit="lanterna", drag=True, cena = self.floresta_inicio, x=300, y=500, vai=self.guarda) self.capa_de_chuva = Elemento (CAPA_DE_CHUVA, tit="capa de chuva", drag=True, cena = self.floresta_inicio, x=200, y=300, vai=self.guardacapa) self.corda = Elemento (CORDA, tit="corda", drag=True, cena = self.floresta_inicio, x=850, y=350, vai=self.guardacorda) self.antidoto = Elemento(ANTIDOTE, tit="antidoto", drag=True, cena = self.floresta_inicio, x=700, y=480, w=80, vai=self.pegaant)
def __init__(self, vit): self.vit = vit self.porta = vit.sala.C.sul self.amilase = Elemento(AMILASE, tit="Amilase Sintética", drag=True) self.cola = Elemento(COLA, tit="Cola Glicosada", drop={"Amilase Sintética": self.abre}, cena=self.porta, x=375, y=300, w=75, h=100, style={"opacity": 0.5}) inv.bota(self.amilase)
def __init__(self): self.ilhamar =ilhamar = Cena(ILHAMAR) # praia = Elemento(PRAIA, cena=ilhamar, x=700, y=398, h=900, style=dict(width= 500, height="650px")) # ilhamar.vai() boia = Elemento(BOIA, cena=ilhamar, x=30, y=100, w=100) boia2 = Elemento(BOIA, cena=ilhamar, x=100, y=250, w=100) boia3 = Elemento(BOIA, cena=ilhamar, x=200, y=400, w=100) boia4 = Elemento(BOIA, cena=ilhamar, x=320, y=550, w=100) boia6 = Elemento(BOIA, cena=ilhamar, x=500, y=80, w=100) boia7 = Elemento(BOIA, cena=ilhamar, x=700, y=200, w=100) boia8 = Elemento(BOIA, cena=ilhamar, x=900, y=300, w=100) boia9 = Elemento(BOIA, cena=ilhamar, x=1100, y=400, w=100) redemoinho = Elemento(REDEMOINHO, cena=ilhamar, x=400, y=300, w=120, tipo="100% 30%", vai=self.vai_fundo) self.tubarao = Elemento(TUBARAO, cena=ilhamar, x=700, y= 500, w=150, style={"opacity":0.2}, vai=self.tub)
def __init__(self, parque, tit="coelho", imagem=COELHO, x=40, y=40): #coelho = Elemento(COELHO, x=100, y=100, w=60, h=40) #coelho.entra(parque) self.parque, self.tit = parque, tit passarinho = Elemento(imagem, tit=tit, x=x, y=y, w=70, h=50, drag=True, vai=self.click) passarinho.entra(parque) parque.cadastra(tit, passarinho)
def __init__(self,parque, tit="tenis", imagem=TENIS, x=300, y=350): #tenis = Elemento(TENIS, x=150, y=210, w=50, h=80) #tenis.entra(parque) self.parque, self.tit = parque, tit galocha = Elemento(imagem, tit=tit, x=x, y=y, w=60, h=50, drag=True, vai=self.click) galocha.entra(parque) parque.cadastra(tit, galocha)
def __init__(self, cena): """ Cria a cena de um acampamento com tesouros """ self.tesouro = 4 super().__init__(cena) #self.pedra = Elemento(TURQUESA, x=50, y=250, w=40, h=40, cena=self) self.pedras = [Elemento( TURQUESA, x=50+50*pedra, y=250, w=40, h=40, cena=self) for pedra in range(self.tesouro)]
def __init__(self, floresta_inicio): self.floresta_inicio = floresta_inicio self.biscoito = Elemento(BISCOITO, x=850, y=500, style=dict(width="50px"), vai=self.pega) self.rede = Elemento(REDE, x=750, y=450, w=200, h=200, drop={"faca": self.corta}) self.fala = Texto(self.floresta_inicio, TEXTO_REDE) self.longe = Cena() self.na_mao = False self.biscoito.entra(self.floresta_inicio)
def __init__(self, pescaria, nome="balde", tipo_peixe="grande", x=350, y=200): #tit quando arrastar o mouse em cima, surge o nome self.peixes = pescaria.peixes(tipo_peixe).keys() todos = [peixe for tam in "pequno médio grande".split() for peixe in pescaria.peixes(tam).keys()] balde = Elemento(BALDE, x=x, y=y, tit=nome, w=100, h=100, style={"opacity": 0}, drop = {peixe: self.pesca for peixe in todos}, vai=self.olha) self.tipo = tipo_peixe balde.entra(pescaria) self.pescaria = pescaria self.texto = Texto(pescaria, f"Eu sou um {nome}")
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
def __init__(self, personagem): # -XXX- tem que passar o personagem aqui self.personagem = personagem dragger = dict(Aninha=self.entra_porta) self.porta = Elemento(img=PORTA, tit="portela", drop=dragger, style=dict(left=170, top=260, width=55, height="150px"))
def __init__(self, quantas_pedras=4): """ Inicia aa coleção de padras com uma quantidade :param int quantas_pedras: numero de pedras neste tesouro """ # = MODELO Conceitual = self.tesouro_contabil = quantas_pedras # = VISTA = Modelo visual de como apresentar o tesouro self.limbo_onde_as_pedras_desaparecem = Cena() self.pedras_especificas = [Elemento( TURQUESA, x=50+50*pedra, y=250, w=40, h=40) for pedra in range(self.tesouro_contabil)]
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, x=800, y=180, w=450, h=400, vai=self.pega) self.longe = Cena() self.na_mao = False self.terra.entra(self.universo)
def __init__(self, parque, tit="maria", x=0, y=420): self.parque, self.tit = parque, tit escolhas = {"geleia de uva": self.uva, "jarra de mel": self.mel} crianca = Elemento(CRIANCA, tit=tit, x=x, y=y, w=140, h=280, drop=escolhas, style={"opacity": 0.3}) crianca.entra(parque)
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, x=230, y=500, style=dict(width="50px"), vai=self.pega) self.longe = Cena() self.na_mao = False self.banana.entra(self.floresta_inicio)
def __init__(self, floresta_inicio): self.floresta_inicio = floresta_inicio self.fala = Texto(self.floresta_inicio, TEXTO_FACA) self.falou = Texto(self.floresta_inicio, FACA_FOI) self.usar = Texto(self.floresta_inicio, FACA_USA) # self.faca = Elemento(FACA, style=dict(left="200px", width="80px"), vai=self.pega) drag = dict(faca=lambda *_: self.fala.vai()) self.faca = Elemento(FACA, tit="faca", x=600, y=500, w=80, vai=self.pega) # self.leao = Elemento(LEAO, tit="leao", x=800, y=500, w=180, drop=drag, cena=floresta_inicio) self.longe = Cena() self.na_mao = False self.faca.entra(self.floresta_inicio)
def __init__( self, imagem=ANA_MARIA, nome="Ola, eu sou a Ana Paula é um prazer estar com vocês, sou mestra e professorA DE BIOLOGIA e estou aqui para ajudar vocês nos conceitos de genéticas e nas provas que terão, aprendendo de uma maneira divertida" ): nome = "Aninha" # -XXX- O nome, isto é o tit do elemento tem que ser Aninha porque foi o que usou no dropper self.ana_maria = Elemento(img=imagem, tit=nome, drag=True, style=dict(left=250, top=330, width=200, heigth="1000px"))
def __init__(self): self.cavernatesouro = cavernatesouro = Cena(CAVERNATESOURO) codigo = Codigo("", "", cena=cavernatesouro, style=dict(x=400, y=300)) tesouro = Elemento(TESOURO, x=245, y=200, w=700, h=400) tesouro.vai = lambda *_: tesouro.entra(cavernatesouro) def troca(*_): cavernatesouro.meio = tesouro codigo = Texto( cavernatesouro, "Opa!! Você achou o tesouro!!", "Mas, cuidado: ao decidir pegar o tesouro, seu amigo não poderá ser salvo", style=dict(x=400, y=300), foi=troca) cavernatesouro.meio = codigo
def __init__(self, parque, jogo, tit="joana", x=400, y=470): tit = input("escreva seu nome") self.jogo = jogo Texto(parque, UMTEXTO).vai() self.parque, self.tit = parque, tit escolhas = {"letra_a": self.a, "letra a": self.a} crianca = Elemento(CENA_CRIANCA, tit=tit, x=x, y=y, w=100, h=100, drop=escolhas, style={"opacity": 0.2}) crianca.entra(parque) crianca.vai = self.a
def __init__(self, pescaria, tit="tiago", x=350, y=200): #tit quando arrastar o mouse em cima, surge o nome crianca = Elemento(CRIANCA, tit=tit, x=x, y=y, w=100, h=100, style={"opacity": 0}, vai=self.olha) crianca.entra(pescaria) self.tit = tit self.texto = Texto(pescaria, f"Olá, eu sou {tit}")
def __init__(self, parque, tit="jarra de mel", x=300, y=400): jarra = Elemento(JARRA, tit=tit, x=x, y=y, w=120, h=80, drag=True) jarra.entra(parque)
def __init__(self, parque): bicho = Elemento(BICHO, tit="esquilo", x=400, y=360, w=120, h=80) bicho.entra(parque)
from elemento.main import Elemento #from fundodomar.main import fundodomar #from _spy.vitollino.main import Cena, STYLE, Codigo #STYLE["width"], STYLE["height"] = 1200, "650px" #from elemento.main import Elemento FUNDODOMAR = "https://imgur.com/Mc6ktz2.png" ESMERALDA = "https://imgur.com/SuPb9Wa.png" MAPA = "https://imgur.com/SuPb9Wa.png" PERGAMINHO = "https://i.imgur.com/6pz0aHn.png" AGUAVIVA = "https://i.imgur.com/7aIQZcW.png" PEIXE = "https://i.imgur.com/toGygPm.gif" fundodomar = Cena(FUNDODOMAR) fundodomar.vai() mapa = Elemento(MAPA, x=700, y=100, w=150, h=150) esmeralda = Elemento(ESMERALDA, cena=fundodomar, x=600, y=500, w=50, h=50) pergaminho = Elemento(PERGAMINHO, cena=fundodomar, x=1000, y=100, w=100, h=100) aguaviva = Elemento(AGUAVIVA, cena=fundodomar, x=200, y=250, w=300, h=200) peixe = Elemento(PEIXE, cena=fundodomar, x=700, y=250, w=200, h=100) def mostra_mapa(*_): mapa.entra(fundodomar) def vai_perigo(*_): from perigo1.main import Perigo Perigo().vai()
def __init__(self, aqui): self.aqui = aqui self.macaca = Elemento(MACACA_MAE, x=600, y=480, w=200, h=200)
def clicounaletra(self, ev): #INVENTARIO.bota(self.mapa[ev.target.id]) INVENTARIO.bota(Elemento(globals()[f"LETRA_{ev.target.id}"])) self.palavramontada += ev.target.id
def __init__(self): parque = Cena(CENA_PARQUE) INVENTARIO.inicia() self.letra_a = Elemento(LETRA_A, tit="A", x=540, y=470, w=90, h=20, drag=True, vai=self.clicounaletra) self.letra_a.entra(parque) self.letra_b = Elemento(LETRA_B, tit="B", x=500, y=250, w=20, h=30, drag=True, vai=self.clicounaletra) self.letra_b.entra(parque) self.letra_c = Elemento(LETRA_C, tit="C", x=400, y=240, w=20, h=30, drag=True, vai=self.clicounaletra) self.letra_c.entra(parque) self.letra_d = Elemento(LETRA_D, tit="D", x=250, y=250, w=20, h=30, drag=True, vai=self.clicounaletra) self.letra_d.entra(parque) self.letra_e = Elemento(LETRA_E, tit="E", x=20, y=230, w=20, h=30, drag=True, vai=self.clicounaletra) self.letra_e.entra(parque) self.letra_f = Elemento(LETRA_F, tit="F", x=50, y=195, w=35, h=30, drag=True, vai=self.clicounaletra) self.letra_f.entra(parque) self.letra_g = Elemento(LETRA_G, tit="G", x=450, y=255, w=40, h=30, drag=True, vai=self.clicounaletra) self.letra_g.entra(parque) self.letra_h = Elemento(LETRA_H, tit="H", x=790, y=195, w=30, h=30, drag=True, vai=self.clicounaletra) self.letra_h.entra(parque) self.letra_i = Elemento(LETRA_I, tit="I", x=550, y=195, w=50, h=30, drag=True, vai=self.clicounaletra) self.letra_i.entra(parque) self.letra_j = Elemento(LETRA_J, tit="J", x=600, y=195, w=30, h=30, drag=True, vai=self.clicounaletra) self.letra_j.entra(parque) self.letra_k = Elemento(LETRA_K, tit="K", x=650, y=205, w=25, h=30, drag=True, vai=self.clicounaletra) self.letra_k.entra(parque) self.letra_l = Elemento(LETRA_L, tit="L", x=350, y=210, w=20, h=30, drag=True, vai=self.clicounaletra) self.letra_l.entra(parque) self.letra_m = Elemento(LETRA_M, tit="M", x=700, y=180, w=30, h=30, drag=True, vai=self.clicounaletra) self.letra_m.entra(parque) self.letra_n = Elemento(LETRA_N, tit="N", x=420, y=190, w=30, h=30, drag=True, vai=self.clicounaletra) self.letra_n.entra(parque) self.letra_o = Elemento(LETRA_O, tit="O", x=90, y=500, w=30, h=30, drag=True, vai=self.clicounaletra) self.letra_o.entra(parque) self.letra_p = Elemento(LETRA_P, tit="P", x=750, y=555, w=30, h=30, drag=True, vai=self.clicounaletra) self.letra_p.entra(parque) self.letra_q = Elemento(LETRA_Q, tit="Q", x=500, y=100, w=35, h=30, drag=True, vai=self.clicounaletra) self.letra_q.entra(parque) self.letra_r = Elemento(LETRA_R, tit="R", x=650, y=400, w=30, h=30, drag=True, vai=self.clicounaletra) self.letra_r.entra(parque) self.letra_s = Elemento(LETRA_S, tit="S", x=150, y=410, w=30, h=30, drag=True, vai=self.clicounaletra) self.letra_s.entra(parque) self.letra_t = Elemento(LETRA_T, tit="T", x=200, y=475, w=30, h=30, drag=True, vai=self.clicounaletra) self.letra_t.entra(parque) self.letra_u = Elemento(LETRA_U, tit="U", x=110, y=225, w=40, h=30, drag=True, vai=self.clicounaletra) self.letra_u.entra(parque) self.letra_v = Elemento(LETRA_V, tit="V", x=555, y=400, w=30, h=30, drag=True, vai=self.clicounaletra) self.letra_v.entra(parque) self.letra_w = Elemento(LETRA_W, tit="W", x=225, y=200, w=30, h=30, drag=True, vai=self.clicounaletra) self.letra_w.entra(parque) self.letra_x = Elemento(LETRA_X, tit="X", x=700, y=450, w=30, h=30, drag=True, vai=self.clicounaletra) self.letra_x.entra(parque) self.letra_y = Elemento(LETRA_Y, tit="Y", x=200, y=100, w=35, h=30, drag=True, vai=self.clicounaletra) self.letra_y.entra(parque) self.letra_z = Elemento(LETRA_Z, tit="Z", x=250, y=105, w=35, h=30, drag=True, vai=self.clicounaletra) self.letra_z.entra(parque) Crianca(parque, self, tit="joana") self.mapa = dict(A=self.letra_a, B=self.letra_b, C=self.letra_c, D=self.letra_d, E=self.letra_e, F=self.letra_f, G=self.letra_g, H=self.letra_h, I=self.letra_i, J=self.letra_j, K=self.letra_k, L=self.letra_l, M=self.letra_m, N=self.letra_n, O=self.letra_o, P=self.letra_p, Q=self.letra_q, R=self.letra_r, S=self.letra_s, T=self.letra_t, U=self.letra_u, V=self.letra_v, W=self.letra_w, X=self.letra_x, Y=self.letra_y, Z=self.letra_z) parque.vai() self.palavramontada = ""