xxxxxxxxxx
228
var tela=1
//retangulo tela menu
var largura=155
var altura=60
var xmenu=345
var bmenu=130
var cmenu=220
var dmenu=330
var imgcartas=[]
var matrizImgcartas=[]
var tempImg
function preload(){
imjdm=loadImage('jdm.png')
telacre=loadImage('telacre.png')
daniel=loadImage('DanielBola.jpeg')
kayalla=loadImage('kayalla.jpeg')
iniciar=loadImage('inicio.png')
infor=loadImage('Informação Do Jogo.png')
imagemfundo=loadImage("./cartas/fundoca.png")
for(i=1;i<=8;i++){
tempImg=loadImage("./cartas/"+i+".png")
imgcartas.push(tempImg)
tempImg=loadImage("./cartas/"+i+".1.png")
imgcartas.push(tempImg)
}
cont=0
for(l=0;l<4;l++){
tempimgLinha=[]
for(c=0;c<4;c++){
tempimgLinha[c]=imgcartas[cont]
cont++
}
matrizImgcartas[l]=tempimgLinha
}
}
function setup() {
createCanvas(500, 500);
console.log(imgcartas.length)
}
function draw() {
background(imjdm);
textStyle(NORMAL)
if(tela==1){
textAlign(CENTER)
textSize(26)
fill(00)
rect(xmenu,bmenu,largura,altura,50)
if(mouseX>xmenu && mouseX< xmenu+largura && mouseY> bmenu && mouseY< bmenu+altura){
//iniciar tela2 mauses
strokeWeight(4);
stroke(51);
fill('pink')
rect(xmenu,bmenu,largura,altura,50)
if(mouseIsPressed){
tela=2}}
fill('yellow')
noStroke()
text("INICIAR",420,170)
//tela recebe cred
fill(00)
rect(xmenu,cmenu,largura,altura,50)
if(mouseX>xmenu && mouseX< xmenu+largura && mouseY> cmenu && mouseY< cmenu+altura){
strokeWeight(4);
stroke(51);
fill('pink')
rect(xmenu,cmenu,largura,altura,50)
if(mouseIsPressed){
tela=3
}}
fill('yellow')
noStroke()
text("CRÉDITOS",420,260)
fill(00)
rect(xmenu,dmenu,largura,altura,50)
if(mouseX>xmenu && mouseX< xmenu+largura && mouseY> dmenu && mouseY< dmenu+altura){
strokeWeight(4);
stroke(51);
fill('pink')
rect(xmenu,dmenu,largura,altura,50)
if(mouseIsPressed){
tela=4
}}
fill('yellow')
noStroke()
textSize(19)
text(" INFORMAÇÕES"+"\n" + " DO JOGO",420,357)
}
if(tela==3){
background(telacre);
//cred
textAlign(LEFT)
textSize(26)
strokeWeight(2)
stroke(2)
fill('yellow')
text("Felipe Daniel Gomes da Silva",153,150)
textSize(20)
fill('yellow')
stroke(1)
text("TEC. em Redes de computadores",153,180)
text("Discente em Design Digital-UFC",153,200)
text("Função:Orientador",153,220)
image(daniel,20,110,130,125)
stroke(2)
textSize(26)
fill('yellow')
text("Paula Kayalla Matias Bezerra",153,350)
stroke(2)
textSize(19)
fill('yellow')
text("TEC. em Redes de computadores",153,380)
text("Discente em Ciência e Tecnologia-UFRN",153,400)
text("Função: Programadora",153,420)
image(kayalla,20,310,130,125)
//bot voltar
rect(210,450,90,50,50)
textSize(20)
fill(51)
noStroke()
text("Voltar",230,485)
if(mouseX>210 && mouseX< 230+90 && mouseY> 450 && mouseY< 450+50){
fill(00)
rect(210,450,90,50,50)
fill('yellow')
text("Voltar",230,485)
if(mouseIsPressed){
tela=1
}}
}
if(tela==2){
background(iniciar);
//rect
fill('yellow')
rect(210,450,90,50,50)
strokeWeight(2);
stroke(51);
textSize(20)
fill(51)
text("Voltar",255,485)
if(mouseX>210 && mouseX< 230+90 && mouseY> 450 && mouseY< 450+50){
noStroke();
stroke(51);
fill(01)
rect(210,450,90,50,50)
fill('yellow')
text("Voltar",255,485)
if(mouseIsPressed){
tela=1
}}
}
if(tela==4){
background(infor);
textAlign(LEFT)
noStroke()
textSize(15)
fill(51)
textSize(26)
text("COMO JOGAR: ",90,180)
textSize(18)
//Com o jogo da memória, se obtêm benefícios como a capacidade de desenvolver habilidades de concentração, autonomia e confiança. ... Tanto as potencialidades quanto as afetividades da criança são harmonizadas no desenvolvimento das habilidades sociais e cognitivas.s
text("Com o jogo da memória, se obtêm benefícios ",45,200)
text("como a capacidade de desenvolver habilidades",45,220)
text("de concentração, autonomia e confiança.",45,240)
text("Este jogo tem o objetivo de ajudar",45,280)
text("na aula de geometria",45,300)
text("explicando as formas geometricas",45,320)
text("mais comum",45,340)
//rectvolt
strokeWeight(2)
stroke(4)
fill('yellow')
rect(210,450,90,50,50)
textSize(20)
noStroke()
stroke(2)
fill(51)
text("Voltar",230,485)
if(mouseX>210 && mouseX< 230+90 && mouseY> 450 && mouseY< 450+50){
noStroke();
stroke(51);
fill(00)
rect(210,450,90,50,50)
fill('yellow')
text("Voltar",230,485)
if(mouseIsPressed){
tela=1
}}
}
}