Exemplo n.º 1
0
Arquivo: main.py Projeto: kwarwp/grete
def dogatthebeach():
    beach = Cena ("https://www.guiaviagensbrasil.com/imagens/bela-praia-camboinha-joao-pessoa-p")
    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(cenabeach,"do you need dolly?")
    txtfunnydog.entra(cenabeach)
    funnydog.vai = txtfunnydog.vai
    cenabeach.vai()
Exemplo n.º 2
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()
Exemplo n.º 3
0
Arquivo: main.py Projeto: kwarwp/kesha
 def __init__(self,
              nome="esquerda",
              numcartas=12,
              lado="e",
              linha=4,
              _3d=False,
              _3da=False):
     self.casa = {}
     self.numcartas, self.lado, self.linha = numcartas, lado, linha
     self.eventos = dict(button_0=lambda: self.score("replay", vai=True),
                         button_1=lambda: self.score("recusa"),
                         button_2=lambda: self.score("Desiste"),
                         button_3=lambda: self.score("errado"),
                         button_4=lambda: self.score("certo"))
     self.nome, self._3d = nome, _3d
     self.nome, self._3da = nome, _3da
     self.elemento = tabuleiro_construido = Cena(img=FUNDO)
     self.pilha_de_cartas = []
     for i, button in enumerate(BUTTONS):
         elem = Elemento(button,
                         cena=self.elemento,
                         vai=self.buttonapertado,
                         tit="button_{}_".format(i),
                         style=dict(left=100 + 110 * i,
                                    top="540px",
                                    width=100,
                                    height="30px"))
         elem.img.id = "button_{}".format(i)
     self.inicia_fase()
Exemplo n.º 4
0
Arquivo: main.py Projeto: kwarwp/ada
 def __init__(self):
     # self.contents = document.querySelector("div.container")
     self.contents = document["pydiv"]
     cena = Cena(CENA)
     cena.vai()
     slate = Elemento(SLATE, cena=cena)
     self.calendar()
Exemplo n.º 5
0
Arquivo: cru.py Projeto: kwarwp/janese
 def __init__(self,imagem, x, y,cena, acao_forte, acao=lambda:None, bateria=True):
     self.Elemento = Elemento(img=imagem, x=x,y=y, vai=self.clica, cena=cena)
     """ """
     self.acao = acao
     self.acao_forte = acao_forte
     #self.caminho = caminho
     self.bateria= bateria
Exemplo n.º 6
0
Arquivo: main.py Projeto: kwarwp/ada
 def __init__(self):
     cena = Cena(WHITE).vai()
     bar = Elemento(GREEN,
                    w=40,
                    h=600,
                    cena=cena,
                    style={'filter': 'hue-rotate(90deg)'})
     [
         Elemento(GREEN,
                  x=ix * 40,
                  w=40,
                  h=600 - ix * 30,
                  cena=cena,
                  style={'filter': f'hue-rotate({ix*20}deg)'})
         for ix in range(20)
     ]
Exemplo n.º 7
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
Exemplo n.º 8
0
 def pegou_atp(ev=None):
     ATP = "https://i.imgur.com/k0Az1Ts.png"
     self.ATP = Elemento(img=ATP,
                         tit="ATP",
                         x=600,
                         y=500,
                         cena=self.parede,
                         drag=True)
Exemplo n.º 9
0
Arquivo: main.py Projeto: kwarwp/carol
def Historia():
    DESERTO = Cena(img="https://s.respostas.com.br/imagens/deserto.jpg")
    sunagakure = Elemento(img=SUNAGAKURE,
                          tit="Sunagure",
                          style=dict(left=150, top=60, width=60, height=200))
    DESERTO.vai
    sunagakure.entra(DESERTO)
    DESERTO.vai()
Exemplo n.º 10
0
Arquivo: main.py Projeto: 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()
Exemplo n.º 11
0
 def norte(self):
     def dica(*_):
         Texto(self.sala_a.norte, "depois de clicar nos dois personagens, vá para outra sala clicando na esquerda, direita ou topo").vai()
     Personagem(PROTEINA, tit="PROTEÍNA", x= 400, y=200, w=200, h=300, cena =sala_a.norte,
     texto="Aqui os ribossomas fabricam a mim, PROTEíNA, me despejando nesta parte do retículo rugoso")
     Personagem(MARIA, tit="MARIA", x= 700, y=200, w=200, h=300, cena =sala_a.norte, foi=dica,
     texto="Entendi, o retículo parece rugoso aqui pois está cheio destas bolinhas, os ribossomas")
     Elemento("https://i.imgur.com/h6fl6wy.png", x= 600, w=300, cena =sala_a.norte)
Exemplo n.º 12
0
 def __init__(self, maria=None):
     self.laboratorio = Cena(img=ABERTURA)
     self.seta = Elemento(SETA,
                          x=300,
                          y=400,
                          w=400,
                          cena=self.laboratorio,
                          vai=self.segue)
Exemplo n.º 13
0
def Historia():
    cenaLondres = Cena(LONDRES)
    elementoHanna = Elemento(img=HANNA,
                             tit="Girl",
                             style=dict(left=150, top=60, width=60,
                                        heigth=200))
    elementoHanna.entra(cenaLondres)
    cenaLondres.vai()
Exemplo n.º 14
0
def  Tesouro():
    templotras3= Cena(img= ACTIVE+TEMPLOTRAS3+POS)
    artefatos2= Elemento(img= ACTIVE+ARTEFATOS2+POS, tit= "tesouros", style=dict(left = 100, top = 100, width = 100, height = "100px"))
    artefatos2.entra(templotras3)
    templotras3.vai
    
    
    templotras3.vai()
Exemplo n.º 15
0
 def folha(self):
     self.x1 = 2
     self.y1 = 460
     self.fundo = Cena(FUNDO)
     self.FOLHA = Elemento(img=FOLHA,
                           cena=self.fundo,
                           x1=self.x1,
                           y1=self.y1,
                           h=80,
                           w=80)
     self.fundo = Cena(FUNDO)
     self.pena = Elemento(img=PENA,
                          cena=self.fundo,
                          x1=self.x1,
                          y1=self.y1,
                          h=80,
                          w=80)
Exemplo n.º 16
0
 def __init__(self):
     self.mochila = Cena(self.MOCHILA)
     #self.mochila.vai()
     #self.atp = Elemento(self.ATP, cena=self.mochila)
     #self.adp = Elemento(self.ADP, cena=self.mochila, x=90)
     self.moedas = []
     self.mochila_inv = Elemento(self.MOCHILA)
     self.mochila_inv.vai = self.mostra_mochila
     self.mochila_fecha = Elemento(self.VOLTA,
                                   cena=self.mochila,
                                   x=0,
                                   y=550,
                                   w=600,
                                   h=50)
     self.mochila_fecha.vai = self.fecha_mochila
     self.pega_atp = lambda *_: None
     inv.bota(self.mochila_inv)
Exemplo n.º 17
0
    def cena_parede(self, *_):
        self.parede=Cena(img=PAREDE)
        def npc_falou(*_):
            Texto(self.parede,"Marque os processos que o DNA executa para a produção de proteína",foi=self.pergunta).vai()

        self.npc=Elemento(img=NPC,x=400, w=200, h=250, texto="Se você acertar os processos irá ganhar uma molécula de ATP", foi=npc_falou)
        vai = self.npc.vai
        self.npc.vai = lambda *_: None
        def maria_falou(*_):
            self.npc.vai = vai
        self.maria=Elemento(img=MARIA, w=200, h=250, texto="Nossa! Quantas proteínas diferentes são produzidas.", foi=maria_falou)
        self.npc.entra(self.parede)
        self.maria.entra(self.parede)
        self.parede.vai()
        self.parede.esquerda=self.nucleo
        
        self.acabou = 2
Exemplo n.º 18
0
 def __init__(self):
     self.fundo = Cena(FUNDO)
     self.zero = Elemento (INICIOMONTANHA, x=230 , y=620, cena=self.fundo, vai=self.comeca)
     self.bonequinha = bonequinha(self.fundo, 1)
     self.cf = dict(A=-1.350, B=-4) 
     #self.planocartesiano = buscar uma imagem
     self.bonequinha = bonequinha(self.fundo)
     self.comeca()
Exemplo n.º 19
0
 def __init__(self):
     self.x = 10
     self.y = 430
     self.ambiente = Cena(self.CENA_01)
     self.boneco = Elemento(self.PERSONAGEM,
                            x=self.x,
                            y=self.y,
                            cena=self.ambiente)
Exemplo n.º 20
0
 def __init__(self):
     self.x1 = 0
     self.y1 = 460
     self.fundo = Cena(FUNDO)
     self.pena = Elemento(img=PENA,
                          cena=self.fundo,
                          x=200,
                          y=450,
                          h=80,
                          w=80)
     self.personagem = Elemento(img=PERSONAGEM,
                                cena=self.fundo,
                                x=self.x1,
                                y=self.y1,
                                h=100,
                                w=100)
     document.bind("keydown", self.andapersonagem)
Exemplo n.º 21
0
    def anda_boneco(self, ev=None):
        matrizPosicaoInicial = [
            [60, 280],  #matrizPosicaoInicial = [[x_inicial, y_inicial]...]
            [450, 50],
            [50, 430],
            [200, 50]
        ]
        """" Faz o boneco caminhar com a catura das setas. 
        
            :param ev: Importa evento de teclado através do browser.
            :retun: self.boneco.x como a posição x do personagem e self.boneco.y como a posição y
        """
        key = ev.keyCode  # recupera o código da tecla enviada no evento

        # os códigos 37 e 38 são a seta para esquerda e para direita
        # os códigos 39 e 40 são a seta para cima e para baixo
        if key in [37, 39]:
            key = (key - 38) * 5
            self.boneco.x += key  # muda a posição de mais um ou menos um
        elif key in [38, 40]:
            key = (key - 39) * 5
            self.boneco.y += key  # muda a posição de mais um ou menos um

        #estudo da parede
        #if self.boneco.x <= 80
        """:if: O personagem atingiu uma porta, muda para a próxima cena
        """
        # FALTA mapear os pontos, criar função para passar parametros ou chamar outra classe
        #ideia de cria uma matriz com os pontos de localização do portal

        if self.boneco.x > 400 and self.boneco.y > 200:
            global cont  #contador estanciado fora do def para gerar a linha a ser lida na lista/MAtriz
            self.ambiente = Cena(
                self.listaFase[cont]
            )  #lê a cena que está descrita no primeiro ítem da lista
            STYLE["width"] = 640
            self.x2 = int(
                matrizPosicaoInicial[cont][0]
            )  #posição x_inicial da fase, descrita na matriz pela primeira coluna
            self.y2 = int(
                matrizPosicaoInicial[cont]
                [1])  #posição y_inicial da fase descita pela segunda coluna

            self.boneco = Elemento(self.BONECO,
                                   x=self.x2,
                                   y=self.y2,
                                   cena=self.ambiente)
            """:Contador: cont: Varia a cada momento que o *if* é satisfeito a ser utilizado em cada cenário e posicição   
               :param self.ambiente: Novos cenários das seguintes fases.
               :param self.x2: Posição x inicial das novas fases.
               :param self.y2: Posição y inicial das novas fases.
            """
            self.boneco.x = self.x2
            self.boneco.y = self.y2
            self.ambiente.vai()
            cont = cont + 1
            if cont > 3:  #Regulador do contador. Precisa alterar a programação para voltar a fase em um portal de retorno
                cont = 0
Exemplo n.º 22
0
 def __init__(self, nome_do_fundo):
     self.x = 10 # valor pré-estabelecido do x
     self.y = 430 # valor pré-estabelecido do y
     
     #self.persona.x = self.x
     #self.persona.y = self.y
     
     self.joystickfalso = Elemento(JOYSTICK_FALSO, h=100 , w=100, x=750, y=440) #cria um elemento posicionado 'acima' no joystick
     self.joystickfalso.entra(nome_do_fundo)
     
     self.marcadorx = Elemento(MARCADOR_X, h=70 , w=70, x=80, y=450) #cria um elemento posicionado 'acima' no joystick
     self.marcadorx.entra(nome_do_fundo)
     
     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=500, 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)
     
     self.persona = Elemento(PERSONAGEM, h=170 , w=190, x=self.x, y=self.y) # cria 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 
Exemplo n.º 23
0
class bruninha ():
    laboratorio=Cena(img=LABORATORIO)
    livro=Cena(img=LIVRO)
    laboty=Cena(img=LABOTY)
    charles=Elemento(img=CHARLES)
    folha=Elemento(img=FOLHA)
    praca=Cena(img=PRACA)
    laboratorio.direita=laboty
    laboty.direita=livro
    livro.direita=praca
    praca.esquerda=livro
    livro.esquerda=laboty
    laboty.esquerda=laboratorio
    charles=Elemento(img=CHARLES)
    ajudante=Elemento(img=AJUDANTE)
    policia=Elemento(img=POLICIA)
    teclado=Elemento(img=TECLADO)
    folha=Elemento(img=FOLHA)
    charles.entra(laboratorio)
    
    charles=Texto(labotorio, "O que aconteceu aqui? Onde está o meu antídoto?")
    charles.vai=falacharles.vai
    
    ajudante.entra(laboty)
    
    ajudante=Texto(laboty, "invadiram a casa do Neytan e o levaram.Por favor chame ajuda!")
    ajudante.vai=falaajudante.vai
    
    charles.entra(livro)
    policia.entra(laboratorio)
    
    policia=Texto(laboratorio, "NÂO MEXE EM NADA! RALA MERMÂO!")
    folha.entra(praca)
    
    folha=Texto(praca, " UUU (Phe/F) FenilalaninaU(Phe/F) FenilalaninaUC")
Exemplo n.º 24
0
def Historia():
	cenaarianagrande = Cena( img ="http://3.bp.blogspot.com/-flrppDI3vno/VRx579SLLKI/AAAAAAAABlc/6GtG4uTfYwY/s1600/cerejeiras%2Bjap%C3%A3o.jp
	Arianagrande=Elemento(img=elemento_Arianagrande,
                     tit=''Arianagrande'',
                            style=dict(left=150, top=60,width=60,height=200
	arianagrande                            
    
             
        
Exemplo n.º 25
0
 def texto_cinco_sul(self, *_):
     self.cinco.sul.vai()
     Texto(
         self.cinco.sul,
         "Não foi dessa vez, sequência errada!!!! Aperte no 'X' para voltar"
     ).vai()
     erroCS = Elemento(img="https://i.imgur.com/eoMGnKA.png",
                       cena=self.cinco.sul,
                       vai=self.texto_tres_leste)
Exemplo n.º 26
0
 def texto_cinco_leste(self, *_):
     Texto(
         self.cinco.leste,
         "Não foi dessa vez, sequência errada!!!! Aperte no 'X' para voltar"
     ).vai()
     erroCL = Elemento(img="https://i.imgur.com/eoMGnKA.png",
                       cena=self.cinco.leste,
                       vai=self.texto_tres_leste)
     self.quatro.leste.vai()
Exemplo n.º 27
0
Arquivo: main.py Projeto: kwarwp/carol
def Historia():
    cenaTeatro = Cena(img ="http://1.bp.blogspot.com/-aGwacYjRKw8/T-St9kEVvMI/AAAAAAAAAvs/ximTg6O8XUA/s1600/ESCENARIOS29+%282%.jpg")
    goku = Elemento(img= GOKU,
           tit ="Goku",
           style = dict(left=100, top=60,width=200, height=45))
    goku.entra(cenaTeatro)
    txtgoku = Texto (cenaTeatro, "Hello")
    goku.vai = txtgoku.vai
    cenaTeatro.vai()
Exemplo n.º 28
0
Arquivo: main.py Projeto: kwarwp/grete
def pleasereadthis():
    store = Cena("https://i.imgur.com/wt7ZgRr.jpg")
    ferarri = Elemento("https://i.imgur.com/enJpNt7.jpg",
                       tit="ferarri",
                       style=dict(left=150, top=60, widht=60, height=200))
    txtferarri = Texto(cenastore, "I want to go for the street")
    ferarri.entra(cenastore)
    ferarri.vai = txtferarri.vai
    cenastore.vai
Exemplo n.º 29
0
def Historia():
    cenaTeatro = Cena(img ="https://supygirls.readthedocs.io/en/latest/_images/DungeonWall.jpg")
    goku = Elemento(img= GOKU,
           tit ="Goku",
           style = dict(left=100, top=157,width=60, height=200))
    goku.entra(cenaTeatro)
    txtgoku=Texto (cenaTeatro, "Hello")
    goku.vai=txtgoku.vai
    cenaTeatro.vai()
Exemplo n.º 30
0
def Historia():
	cenaFundodomar = Cena (img = "https://img.elo7.com.br/product/original/132A83E/painel-fundo-do-mar-g-frete-gratis-festa-de-aniversario.jpg")
	pequenasereia = Elemento (img = linkDaSereia,
                               tit="Mar",
                               style=dict(left=30, top=60, width=180, height=100))
	pequenasereia.entra(cenaFundodomar)
	txtpequenasereia = Texto (cenaFundodomar, "Hello")
	pequenasereia.vai = txtpequenasereia.vai()
	cenaFundodomar.vai()