Commit b6dc43d5 authored by Tt's avatar Tt

修改

parent 16c75716
......@@ -105,6 +105,20 @@
}
.box-son-0 {
border: 1px solid gray;
width: 100%;
text-align: center;
border-left: 0px;
border-right: 0px;
border-bottom: 0px;
}
.box-son-1 {
border: 1px 0px 0px 0px solid gray;
width: 100%;
text-align: left;
}
......
......@@ -2,10 +2,10 @@
<div *ngFor="let biaoti of picArr; let a = index">
<div class="box-dbt-0">
<div style="width:100%;vertical-align:middle; padding-top: 10px; padding-bottom: 10px; text-align: center;">
<div style="width:100%;vertical-align:middle; padding-top: 10px; padding-bottom: 10px; text-align: left;">
<span style="font-weight: 700; font-size: 30px; vertical-align:middle;">标题:</span>
<input [(ngModel)]="biaoti.title" type="text"
style="width: 200px;height:35px;margin-left: 30px; vertical-align:middle;font-size: 30px; border: 1px solid #ccc; border-radius: 10px;" />
style="width: 1000px;height:35px;margin-left: 30px; vertical-align:middle;font-size: 30px; border: 1px solid #ccc; border-radius: 10px;" />
</div>
</div>
......@@ -14,10 +14,10 @@
<div *ngFor="let zhulei of biaoti.child; let b = index">
<div class="box-lbt-0">
<div style="width:100%;vertical-align:middle; padding-top: 10px; padding-bottom: 10px; text-align: center;">
<div style="width:100%;vertical-align:middle; padding-top: 10px; padding-bottom: 10px; text-align: left;">
<span style="font-weight: 700; font-size: 30px; vertical-align:middle;">主类:</span>
<input [(ngModel)]="zhulei.title" type="text"
style="width: 200px;height:35px;margin-left: 30px; vertical-align:middle;font-size: 30px; border: 1px solid #ccc; border-radius: 10px;" />
style="width: 1000px;height:35px;margin-left: 30px; vertical-align:middle;font-size: 30px; border: 1px solid #ccc; border-radius: 10px;" />
</div>
</div>
......@@ -26,48 +26,46 @@
<div *ngFor="let fenlei of zhulei.child; let c = index">
<div class="box-lbt-0">
<div
style="width:100%;vertical-align:middle; padding-top: 10px; padding-bottom: 10px; text-align: center;">
<div style="width:100%;vertical-align:middle; padding-top: 10px; padding-bottom: 10px; text-align: left;">
<span style="font-weight: 700; font-size: 30px; vertical-align:middle;">分类{{c+1}}:</span>
<input [(ngModel)]="fenlei.title" type="text"
style="width: 200px;height:35px;margin-left: 30px; vertical-align:middle;font-size: 30px; border: 1px solid #ccc; border-radius: 10px;" />
style="width: 1000px;height:35px;margin-left: 30px; vertical-align:middle;font-size: 30px; border: 1px solid #ccc; border-radius: 10px;" />
</div>
</div>
<div class="box-lbt-1">
<div *ngFor="let sonlei of fenlei.child; let d = index">
<div class="box-lbt-0">
<div style="width: 50%;margin-left: 25%;">
<div class="box-son-0">
<div>
<div
style="width:100%;vertical-align:middle; padding-top: 10px; padding-bottom: 10px; text-align: center;">
style="width:100%;vertical-align:middle; padding-top: 10px; padding-bottom: 10px; text-align: left;">
<span
style="font-weight: 700; font-size: 30px; vertical-align:middle;">分类{{c+1}}-子类{{d+1}}:</span>
<input [(ngModel)]="sonlei.title" type="text"
style="width: 200px;height:35px;margin-left: 30px; vertical-align:middle;font-size: 30px; border: 1px solid #ccc; border-radius: 10px;" />
<button style="margin-left: 30px;" nz-button nzType="danger" (click)="deleteSon(a, b, c,d)">
<span>删除</span>
</button>
<input [(ngModel)]="sonlei.title" type="text"
style="width: 1000px;height:35px;margin-left: 30px; vertical-align:middle;font-size: 30px; border: 1px solid #ccc; border-radius: 10px;" />
</div>
</div>
</div>
<div class="box-lbt-1">
<div class="box-son-1">
<div class="group-item">
<div *ngFor="let it of sonlei.child; let e = index">
<div class="border">
<div style="width: 100%; align-items:center;">
<span style="font-weight: 500; font-size: 27px; color: red; ">选项{{e+1}}</span>
<div class="item-box" style="width: 50%;height:200px; margin-left: 25%; margin-top: 10%;">
<span>文字</span>
<input style="width: 80%; margin-bottom: 0.5vw" type="text"
nz-input placeholder="" [(ngModel)]="it.title" (blur)="saveItem()">
<input style="width: 80%; margin-bottom: 0.5vw" type="text" nz-input placeholder=""
[(ngModel)]="it.title" (blur)="saveItem()">
<span>图片</span>
<app-upload-image-with-preview style="width: 100%"
[picUrl]="it.pic_url" (imageUploaded)="onImageUploadSuccessByItem($event, it)">
<app-upload-image-with-preview style="width: 100%" [picUrl]="it.pic_url"
(imageUploaded)="onImageUploadSuccessByItem($event, it)">
</app-upload-image-with-preview>
<!-- <div style="display: flex; justify-items: center; padding-top: 10px">
......@@ -109,14 +107,16 @@
</div>
<div class="box-lbt-2">
<button *ngIf="picArr[a].child[b].child[c].child.length >= 4 || picArr[a].child[b].child[0].child.length + picArr[a].child[b].child[1].child.length >=6"
<button
*ngIf="picArr[a].child[b].child[c].child.length >= 4 || picArr[a].child[b].child[0].child.length + picArr[a].child[b].child[1].child.length >=6"
style="width: 100%; height: 100%; border-radius: 25px; " disabled nz-button nzType="solid"
(click)="addSon(a, b, c)">
<i nz-icon nzType="plus-circle"></i>
<span style="font-size: 20px;">增加子类</span>
</button>
<button *ngIf="picArr[a].child[b].child[c].child.length < 4 && picArr[a].child[b].child[0].child.length + picArr[a].child[b].child[1].child.length <6"
<button
*ngIf="picArr[a].child[b].child[c].child.length < 4 && picArr[a].child[b].child[0].child.length + picArr[a].child[b].child[1].child.length <6"
style="width: 100%; height: 100%; border-radius: 25px; " nz-button nzType="solid"
(click)="addSon(a, b, c)">
<i nz-icon nzType="plus-circle"></i>
......
{
"ver": "1.1.0",
"uuid": "c551970e-b095-45f3-9f1d-25cde8b8deb1",
"uuid": "f792997f-f029-4df1-9adb-5e28c3e1a1c4",
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.1.0",
"uuid": "5d8c6a7f-89af-4150-a1e1-c687492e05c3",
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.1.0",
"uuid": "f0adf7cd-b2db-4a5a-87fe-4d818a6a6b89",
"subMetas": {}
}
\ No newline at end of file
function retData() {
// let item = {"contentObj":{"picArr":[[[{"cardId":"","left":{"title":"boy1","pic_url":"http://staging-teach.cdn.ireadabc.com/1baedb0b31dc5503e65e114ce21940ab.jpeg","audio_url":"http://staging-teach.cdn.ireadabc.com/495324991838775e49e3ca6593d432c9.mp3","radioValue":"C"},"right":{"title":"food","pic_url":"http://staging-teach.cdn.ireadabc.com/38117778476574c7ef8b445cf24d6eb5.jpg","audio_url":"http://staging-teach.cdn.ireadabc.com/495324991838775e49e3ca6593d432c9.mp3","radioValue":"A"},"radioValue":"B"},{"cardId":"","left":{"title":"boy2","pic_url":"","audio_url":"http://staging-teach.cdn.ireadabc.com/17cc0e2a383e4632147dc495a1397915.mp3","radioValue":"C"},"right":{"title":"","pic_url":"http://staging-teach.cdn.ireadabc.com/21373528a7f38575e871de1d8e5a9671.jpg","audio_url":"http://staging-teach.cdn.ireadabc.com/17cc0e2a383e4632147dc495a1397915.mp3","radioValue":"B"},"radioValue":"E"}],[{"cardId":"","left":{"title":"girl1","pic_url":"","audio_url":"http://staging-teach.cdn.ireadabc.com/205722475ccaca6233b2f28e635405ca.mp3","radioValue":"A"},"right":{"title":"","pic_url":"http://staging-teach.cdn.ireadabc.com/5d099c38000b804241f7dc1286b17457.jpg","audio_url":"http://staging-teach.cdn.ireadabc.com/205722475ccaca6233b2f28e635405ca.mp3","radioValue":"B"},"radioValue":"D"},{"cardId":"","left":{"title":"girl2","pic_url":"","audio_url":"http://staging-teach.cdn.ireadabc.com/0b6ef24f15c6d8ad7bf27cc913445ebf.mp3","radioValue":"A"},"right":{"title":"","pic_url":"http://staging-teach.cdn.ireadabc.com/0abab9a26d537ebf1835a2ed8430162e.jpg","audio_url":"http://staging-teach.cdn.ireadabc.com/0b6ef24f15c6d8ad7bf27cc913445ebf.mp3","radioValue":"B"},"radioValue":"D"},{"cardId":"","left":{"title":"girl3","pic_url":"","audio_url":"http://staging-teach.cdn.ireadabc.com/b2c170f84b85dddf554b5c837d1d6e30.mp3","radioValue":"A"},"right":{"title":"","pic_url":"http://staging-teach.cdn.ireadabc.com/5f34d4100a6ecb187fd715c99e917fc8.jpg","audio_url":"http://staging-teach.cdn.ireadabc.com/b2c170f84b85dddf554b5c837d1d6e30.mp3","radioValue":"B"},"radioValue":"D"}]],[[{"cardId":"","left":{"title":"rabbit","pic_url":"","audio_url":"http://staging-teach.cdn.ireadabc.com/a7bd7c4de71319db5b6b0b60f0957e21.mp3","radioValue":"A"},"right":{"title":"","pic_url":"http://staging-teach.cdn.ireadabc.com/fe229e6b32f385fb8fe5eb9ec5843c66.jpg","audio_url":"http://staging-teach.cdn.ireadabc.com/a7bd7c4de71319db5b6b0b60f0957e21.mp3","radioValue":"B"},"radioValue":"D"},{"cardId":"","left":{"title":"cat","pic_url":"","audio_url":"http://staging-teach.cdn.ireadabc.com/6c8dcd159d4f05bc93838cc47d3895f4.mp3","radioValue":"A"},"right":{"title":"","pic_url":"http://staging-teach.cdn.ireadabc.com/9c5fa50efd7a004f24ea7fcbcf81080e.jpg","audio_url":"http://staging-teach.cdn.ireadabc.com/6c8dcd159d4f05bc93838cc47d3895f4.mp3","radioValue":"B"},"radioValue":"A"},{"cardId":"","left":{"title":"coffe","pic_url":"","audio_url":"http://staging-teach.cdn.ireadabc.com/3d0fea61d5d97f3caf04a9b738a0291b.mp3","radioValue":"A"},"right":{"title":"","pic_url":"http://staging-teach.cdn.ireadabc.com/9d114554c4760ff35f1ff5479504a531.jpg","audio_url":"http://staging-teach.cdn.ireadabc.com/a7bd7c4de71319db5b6b0b60f0957e21.mp3","radioValue":"B"},"radioValue":"D"},{"cardId":"","left":{"title":"tea","pic_url":"","audio_url":"http://staging-teach.cdn.ireadabc.com/448291140d0b780c0278a14bf49277cb.mp3","radioValue":"A"},"right":{"title":"","pic_url":"http://staging-teach.cdn.ireadabc.com/bf26f92e4f0557ad70ac27006855dae9.jpg","audio_url":"http://staging-teach.cdn.ireadabc.com/6c8dcd159d4f05bc93838cc47d3895f4.mp3","radioValue":"B"},"radioValue":"D"}]],[[{"cardId":"","left":{"title":"cool","pic_url":"","audio_url":"http://staging-teach.cdn.ireadabc.com/0e67aa701df18cbb5581ffb81ffa7836.mp3","radioValue":"A"},"right":{"title":"","pic_url":"http://staging-teach.cdn.ireadabc.com/38117778476574c7ef8b445cf24d6eb5.jpg","audio_url":"http://staging-teach.cdn.ireadabc.com/4c0379bc0f3bd0722874b2e11fb35336.mp3","radioValue":"B"},"radioValue":"D"},{"cardId":"","left":{"title":"big eye","pic_url":"","audio_url":"http://staging-teach.cdn.ireadabc.com/fe226bc303f03ea994cb9a93d1620284.mp3","radioValue":"A"},"right":{"title":"","pic_url":"http://staging-teach.cdn.ireadabc.com/21373528a7f38575e871de1d8e5a9671.jpg","audio_url":"http://staging-teach.cdn.ireadabc.com/b985b71cd2f3c2d31e45992e4ae69d7f.mp3","radioValue":"B"},"radioValue":"A"},{"cardId":"","left":{"title":"cute","pic_url":"","audio_url":"http://staging-teach.cdn.ireadabc.com/84c7b82de1a09da792237a174ebe071b.mp3","radioValue":"A"},"right":{"title":"","pic_url":"http://staging-teach.cdn.ireadabc.com/5d099c38000b804241f7dc1286b17457.jpg","audio_url":"http://staging-teach.cdn.ireadabc.com/7c1d1540233b6d050eae8215679104a8.mp3","radioValue":"B"},"radioValue":"D"},{"cardId":"","left":{"title":"shuai","pic_url":"","audio_url":"http://staging-teach.cdn.ireadabc.com/9e799e7e86cd50c6699ca0e859c8aa1f.mp3","radioValue":"A"},"right":{"title":"","pic_url":"http://staging-teach.cdn.ireadabc.com/338dbee896e1fa8869495c84c603c33f.jpg","audio_url":"http://staging-teach.cdn.ireadabc.com/9a6b3177ab53ba75bcf293df1065bb64.mp3","radioValue":"B"},"radioValue":"D"},{"cardId":"","left":{"title":"big m","pic_url":"","audio_url":"http://staging-teach.cdn.ireadabc.com/495324991838775e49e3ca6593d432c9.mp3","radioValue":"C"},"right":{"title":"","pic_url":"http://staging-teach.cdn.ireadabc.com/0abab9a26d537ebf1835a2ed8430162e.jpg","audio_url":"http://staging-teach.cdn.ireadabc.com/17cc0e2a383e4632147dc495a1397915.mp3","radioValue":"B"},"radioValue":"E"}]]]}}
// let item = {
// "contentObj": {
// "picArr": [
// {
// "title": "title",
// "child": [
// {
// "title": "main",
// "child":
// [
// {
// "title": "sub1",
// "child": [
// {
// "title": "son11",
// "child": [{ "cardId": "", "title": "aa", "pic_url": "http://staging-teach.cdn.ireadabc.com/88b1cd55a3e2ff70447331078c0e2941.png", "audio_url": "" }, { "cardId": "", "title": "bb", "pic_url": "http://staging-teach.cdn.ireadabc.com/26524d3fa6a060d80664b40cfb6105f6.png", "audio_url": "" }, { "cardId": "", "title": "cc", "pic_url": "http://staging-teach.cdn.ireadabc.com/0cd859af88f946a66313cc06e4628fd2.png", "audio_url": "" }, { "cardId": "", "title": "dd", "pic_url": "http://staging-teach.cdn.ireadabc.com/021d3b3904cb6e675286ac8fcb60da2b.png", "audio_url": "" }]
// },
// {
// "title": "son12",
// "child": [{ "cardId": "", "title": "a2", "pic_url": "http://staging-teach.cdn.ireadabc.com/1c897715153af629e0aa1bfbf54472a4.png", "audio_url": "" }, { "cardId": "", "title": "b2", "pic_url": "http://staging-teach.cdn.ireadabc.com/756083716a8ab9f2b6b66331e659845d.png", "audio_url": "" }, { "cardId": "", "title": "c2", "pic_url": "http://staging-teach.cdn.ireadabc.com/6c13e8f14b294ca866205633b9f44891.png", "audio_url": "" }, { "cardId": "", "title": "d2", "pic_url": "http://staging-teach.cdn.ireadabc.com/b3f29929c06d1af57bb6eb08d3f5b0d0.png", "audio_url": "" }]
// },
// {
// "title": "son13",
// "child": [{ "cardId": "", "title": "a3", "pic_url": "http://staging-teach.cdn.ireadabc.com/88b1cd55a3e2ff70447331078c0e2941.png", "audio_url": "" }, { "cardId": "", "title": "b3", "pic_url": "http://staging-teach.cdn.ireadabc.com/26524d3fa6a060d80664b40cfb6105f6.png", "audio_url": "" }, { "cardId": "", "title": "c3", "pic_url": "http://staging-teach.cdn.ireadabc.com/88b1cd55a3e2ff70447331078c0e2941.png", "audio_url": "" }, { "cardId": "", "title": "d3", "pic_url": "http://staging-teach.cdn.ireadabc.com/26524d3fa6a060d80664b40cfb6105f6.png", "audio_url": "" }]
// }
// ]
// }, {
// "title": "sub2",
// "child": [{
// "title": "son21",
// "child": [{ "cardId": "", "title": "q1", "pic_url": "http://staging-teach.cdn.ireadabc.com/fde35aaec618529b0b2b6cb3a18d1f85.png", "audio_url": "" }, { "cardId": "", "title": "w1", "pic_url": "http://staging-teach.cdn.ireadabc.com/0cd859af88f946a66313cc06e4628fd2.png", "audio_url": "" }, { "cardId": "", "title": "e1", "pic_url": "http://staging-teach.cdn.ireadabc.com/021d3b3904cb6e675286ac8fcb60da2b.png", "audio_url": "" }]
// },
// {
// "title": "son22",
// "child": [{ "cardId": "", "title": "q2", "pic_url": "http://staging-teach.cdn.ireadabc.com/756083716a8ab9f2b6b66331e659845d.png", "audio_url": "" }, { "cardId": "", "title": "q3", "pic_url": "http://staging-teach.cdn.ireadabc.com/6e9fec092bc8d547be4ad9fd5e01acf1.png", "audio_url": "" }]
// },
// {
// "title": "son23",
// "child": [{ "cardId": "", "title": "q4", "pic_url": "http://staging-teach.cdn.ireadabc.com/b0f3c1a415015b254692a5d536b5b3fa.png", "audio_url": "" }, { "cardId": "", "title": "w4", "pic_url": "http://staging-teach.cdn.ireadabc.com/cfa80b631a57638fd27cdef0d5aa2c2d.png", "audio_url": "" }]
// }
// ]
// }]
// }]
// }]
// }
// }
let item = { "contentObj": { "picArr": [{ "title": "fff", "child": [{ "title": "ddd", "child": [{ "title": "aaa", "child": [{ "title": "fff", "child": [{ "cardId": "", "title": "1", "pic_url": "http://staging-teach.cdn.ireadabc.com/88b1cd55a3e2ff70447331078c0e2941.png", "audio_url": "" }] }] }, { "title": "bbb", "child": [{ "title": "ee", "child": [{ "cardId": "", "title": "2", "pic_url": "http://staging-teach.cdn.ireadabc.com/fde35aaec618529b0b2b6cb3a18d1f85.png", "audio_url": "" }] }] }] }] }] } }
let item = {
"contentObj": {
"picArr": [
{
"title": "title",
"child": [
{
"title": "main",
"child":
[
{
"title": "sub1",
"child": [
{
"title": "son11",
"child": [ { "cardId": "", "title": "dd", "pic_url": "http://staging-teach.cdn.ireadabc.com/021d3b3904cb6e675286ac8fcb60da2b.png", "audio_url": "" }]//{ "cardId": "", "title": "aa", "pic_url": "http://staging-teach.cdn.ireadabc.com/88b1cd55a3e2ff70447331078c0e2941.png", "audio_url": "" }, { "cardId": "", "title": "bb", "pic_url": "http://staging-teach.cdn.ireadabc.com/26524d3fa6a060d80664b40cfb6105f6.png", "audio_url": "" }, { "cardId": "", "title": "cc", "pic_url": "http://staging-teach.cdn.ireadabc.com/0cd859af88f946a66313cc06e4628fd2.png", "audio_url": "" },
},
// {
// "title": "son12",
// "child": [{ "cardId": "", "title": "a2", "pic_url": "http://staging-teach.cdn.ireadabc.com/1c897715153af629e0aa1bfbf54472a4.png", "audio_url": "" }, { "cardId": "", "title": "b2", "pic_url": "http://staging-teach.cdn.ireadabc.com/756083716a8ab9f2b6b66331e659845d.png", "audio_url": "" }, { "cardId": "", "title": "c2", "pic_url": "http://staging-teach.cdn.ireadabc.com/6c13e8f14b294ca866205633b9f44891.png", "audio_url": "" }, { "cardId": "", "title": "d2", "pic_url": "http://staging-teach.cdn.ireadabc.com/b3f29929c06d1af57bb6eb08d3f5b0d0.png", "audio_url": "" }]
// },
// {
// "title": "son13",
// "child": [{ "cardId": "", "title": "a3", "pic_url": "http://staging-teach.cdn.ireadabc.com/88b1cd55a3e2ff70447331078c0e2941.png", "audio_url": "" }, { "cardId": "", "title": "b3", "pic_url": "http://staging-teach.cdn.ireadabc.com/26524d3fa6a060d80664b40cfb6105f6.png", "audio_url": "" }, { "cardId": "", "title": "c3", "pic_url": "http://staging-teach.cdn.ireadabc.com/88b1cd55a3e2ff70447331078c0e2941.png", "audio_url": "" }, { "cardId": "", "title": "d3", "pic_url": "http://staging-teach.cdn.ireadabc.com/26524d3fa6a060d80664b40cfb6105f6.png", "audio_url": "" }]
// },
// {
// "title": "son23",
// "child": [{ "cardId": "", "title": "q4", "pic_url": "http://staging-teach.cdn.ireadabc.com/b0f3c1a415015b254692a5d536b5b3fa.png", "audio_url": "" }, { "cardId": "", "title": "w4", "pic_url": "http://staging-teach.cdn.ireadabc.com/cfa80b631a57638fd27cdef0d5aa2c2d.png", "audio_url": "" }]
// }
]
}, {
"title": "sub2",
"child": [{
"title": "son21",
"child": [ { "cardId": "", "title": "e1", "pic_url": "http://staging-teach.cdn.ireadabc.com/021d3b3904cb6e675286ac8fcb60da2b.png", "audio_url": "" }]//{ "cardId": "", "title": "q1", "pic_url": "http://staging-teach.cdn.ireadabc.com/fde35aaec618529b0b2b6cb3a18d1f85.png", "audio_url": "" }, { "cardId": "", "title": "w1", "pic_url": "http://staging-teach.cdn.ireadabc.com/0cd859af88f946a66313cc06e4628fd2.png", "audio_url": "" },
},
// {
// "title": "son22",
// "child": [{ "cardId": "", "title": "q2", "pic_url": "http://staging-teach.cdn.ireadabc.com/756083716a8ab9f2b6b66331e659845d.png", "audio_url": "" }, { "cardId": "", "title": "q3", "pic_url": "http://staging-teach.cdn.ireadabc.com/6e9fec092bc8d547be4ad9fd5e01acf1.png", "audio_url": "" }]
// }
]
}]
}]
}]
}
}
// let item = { "contentObj": { "picArr": [{ "title": "fff", "child": [{ "title": "ddd", "child": [{ "title": "aaa", "child": [{ "title": "fff", "child": [{ "cardId": "", "title": "1", "pic_url": "http://staging-teach.cdn.ireadabc.com/88b1cd55a3e2ff70447331078c0e2941.png", "audio_url": "" }] }] }, { "title": "bbb", "child": [{ "title": "ee", "child": [{ "cardId": "", "title": "2", "pic_url": "http://staging-teach.cdn.ireadabc.com/fde35aaec618529b0b2b6cb3a18d1f85.png", "audio_url": "" }] }] }] }] }] } }
return item;
}
export const itemData = retData();
\ No newline at end of file
......@@ -55,208 +55,10 @@ class GameManager {
this.parseData();
}
parseData(data) {
// let obj = [{
// id: 0,
// title: "biaoti",
// child: [
// {
// id: 0, title: "zhulei", child: [
// {
// id: 10,
// title: "fenlei1",
// child: [
// {
// id: 101,
// title: "sonlei1",
// child: [
// {
// id: 1001,
// title: "card1",
// title: "卡片1001",
// radioValue: "A"
// },
// {
// id: 1002,
// title: "card2",
// title: "卡片1002",
// radioValue: "A"
// },
// {
// id: 1003,
// title: "card3",
// title: "卡片1003",
// radioValue: "A"
// },
// {
// id: 1004,
// title: "card4",
// title: "卡片1004",
// radioValue: "A"
// }
// ]
// },
// {
// id: 101,
// title: "sonlei2",
// child: [
// {
// id: 1001,
// title: "card1",
// title: "卡片1001",
// radioValue: "A"
// },
// {
// id: 1002,
// title: "card2",
// title: "卡片1002",
// radioValue: "A"
// },
// {
// id: 1003,
// title: "card3",
// title: "卡片1003",
// radioValue: "A"
// },
// {
// id: 1004,
// title: "card4",
// title: "卡片1004",
// radioValue: "A"
// }
// ]
// }
// ]
// },
// {
// id: 10,
// title: "fenlei2",
// child: [
// {
// id: 101,
// title: "sonlei3",
// child: [
// {
// id: 1001,
// title: "card1",
// title: "卡片1001",
// radioValue: "A"
// },
// {
// id: 1002,
// title: "card2",
// title: "卡片1002",
// radioValue: "A"
// },
// {
// id: 1003,
// title: "card3",
// title: "卡片1003",
// radioValue: "A"
// },
// {
// id: 1004,
// title: "card4",
// title: "卡片1004",
// radioValue: "A"
// }
// ]
// },
// {
// id: 201,
// title: "sonlei4",
// child: [
// {
// id: 1001,
// title: "card2",
// title: "卡片2001",
// radioValue: "A"
// },
// {
// id: 1002,
// title: "card2",
// title: "卡片2002",
// radioValue: "A"
// },
// {
// id: 1003,
// title: "card3",
// title: "卡片2003",
// radioValue: "A"
// },
// {
// id: 1004,
// title: "card4",
// title: "卡片2004",
// radioValue: "A"
// }
// ]
// },
// {
// id: 201,
// title: "sonlei5",
// child: [
// {
// id: 1001,
// title: "card2",
// title: "卡片2001",
// radioValue: "A"
// },
// {
// id: 1002,
// title: "card2",
// title: "卡片2002",
// radioValue: "A"
// },
// {
// id: 1003,
// title: "card3",
// title: "卡片2003",
// radioValue: "A"
// },
// {
// id: 1004,
// title: "card4",
// title: "卡片2004",
// radioValue: "A"
// }
// ]
// },
// {
// id: 201,
// title: "sonlei6",
// child: [
// {
// id: 1001,
// title: "card2",
// title: "卡片2001",
// radioValue: "A"
// },
// {
// id: 1002,
// title: "card2",
// title: "卡片2002",
// radioValue: "A"
// },
// {
// id: 1003,
// title: "card3",
// title: "卡片2003",
// radioValue: "A"
// },
// {
// id: 1004,
// title: "card4",
// title: "卡片2004",
// radioValue: "A"
// }
// ]
// }
// ]
// }
// ]
// }
// ]
// }];
this._title = {};
this._allClass = [];
this._sonArray = [];
this._cardArray = [];
let obj = data.contentObj.picArr;
let fenId = 1;
......@@ -309,6 +111,16 @@ class GameManager {
let sonClass = this.getSonClass(sonId);
return sonClass.isChild(cardId);
}
randomPageCards() {
//页面内部数字要打乱 0 1 2 3 4 5 6 7 8 每次动态取出一个值 然后动态处理
let arr = [];
while (this._cardArray.length > 0) {
let rand = Math.floor(Math.random() * this._cardArray.length);
arr.push(this._cardArray[rand]);
this._cardArray.splice(rand, 1);
}
this._cardArray = arr;
}
}
// []zhuclass
// [] []fenclass
......
class CalculativeResize {
static resizeInfo() {
//0.设计尺寸
let baseSize = cc.size(1920, 1080);
let baseSize = cc.size(1280, 720);
//1.获取屏幕尺寸
let canvasSize = cc.view.getCanvasSize();
//2.将屏幕宽高 以高度对齐的方式 换算出场景 宽度
let sumSize = cc.size(canvasSize.width * baseSize.height / canvasSize.height, baseSize.height)
let sumSizeW = cc.size(canvasSize.width * baseSize.height / canvasSize.height, baseSize.height)
//3.计算场景宽度与设计宽度比率
let scaleX = sumSize.width / baseSize.width;
let posX = sumSize.width - baseSize.width;
let scaleX = sumSizeW.width / baseSize.width;
//高屏幕适配
if (scaleX <= 1) {
let sumSize = cc.size(baseSize.width, canvasSize.height * baseSize.width / canvasSize.width)
let scaleY = sumSize.height / baseSize.height;
let posY = sumSize.height - baseSize.height;
// let posY = sumSize.height * (1 - 1 / scaleX);
return { scaleX: 1, scaleY: scaleY, posX: 0, orgX: 0, posY: posY, orgY: - posY / 2 }
let sumSizeY = cc.size(baseSize.width, canvasSize.height * (baseSize.width / canvasSize.width))
let scaleY = sumSizeY.height / baseSize.height;
let posY = sumSizeY.height - baseSize.height;
return {
scaleX: 1,
posX: 0,
moveX: 0,
scaleY: scaleY,
posY: posY,
moveY: - posY / 2
}
} else {
let posX = sumSizeW.width - baseSize.width;
//需要拓展的宽度缩放比
return {
scaleX: scaleX,
posX: posX,
moveX: - posX / 2,
scaleY: 1,
posY: 0,
moveY: 0
};
}
//需要拓展的宽度缩放比
return { scaleX: scaleX, scaleY: 1, posX: posX, orgX: - posX / 2, posY: 0, orgY: 0 };
}
}
//关于齐刘海的适配方案。
......@@ -122,11 +136,11 @@ cc.Class({
//动态上移
if (this.p_top == 1) {
this.node.y = nodeY + posY / 2 *0.75
this.node.y = nodeY + posY / 2
}
//动态下移
if (this.p_bottom == 1) {
this.node.y = nodeY - posY / 2 *0.75
this.node.y = nodeY - posY / 2
}
},
......
......@@ -75,10 +75,7 @@
"__id__": 5
},
{
"__id__": 7
},
{
"__id__": 13
"__id__": 12
},
{
"__id__": 19
......@@ -87,52 +84,67 @@
"__id__": 46
},
{
"__id__": 79
"__id__": 64
},
{
"__id__": 98
"__id__": 66
},
{
"__id__": 101
"__id__": 67
},
{
"__id__": 104
"__id__": 74
},
{
"__id__": 105
"__id__": 75
},
{
"__id__": 106
"__id__": 93
},
{
"__id__": 108
"__id__": 95
},
{
"__id__": 114
"__id__": 98
},
{
"__id__": 127
"__id__": 101
},
{
"__id__": 153
"__id__": 102
},
{
"__id__": 155
"__id__": 103
},
{
"__id__": 157
"__id__": 105
},
{
"__id__": 111
},
{
"__id__": 124
},
{
"__id__": 150
},
{
"__id__": 152
},
{
"__id__": 154
}
],
"_active": true,
"_components": [
{
"__id__": 159
"__id__": 156
},
{
"__id__": 160
"__id__": 157
},
{
"__id__": 161
"__id__": 158
}
],
"_prefab": null,
......@@ -281,100 +293,6 @@
"_alignWithScreen": true,
"_id": "81GN3uXINKVLeW4+iKSlim"
},
{
"__type__": "cc.Node",
"_name": "view",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 6
}
],
"_prefab": null,
"_opacity": 200,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1280,
"height": 720
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "90omiNyU9Ma7Rj61UoGoM9"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "59ca3150-1f56-4f3e-908c-3c22e870861c"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "e9x7g6r3xO3JOoad8NAub9"
},
{
"__type__": "cc.Node",
"_name": "bg",
......@@ -384,10 +302,10 @@
},
"_children": [
{
"__id__": 8
"__id__": 6
},
{
"__id__": 11
"__id__": 9
}
],
"_active": true,
......@@ -445,16 +363,16 @@
"_name": "invalid-name",
"_objFlags": 0,
"_parent": {
"__id__": 7
"__id__": 5
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 9
"__id__": 7
},
{
"__id__": 10
"__id__": 8
}
],
"_prefab": null,
......@@ -510,7 +428,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 8
"__id__": 6
},
"_enabled": true,
"_materials": [
......@@ -542,7 +460,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 8
"__id__": 6
},
"_enabled": true,
"r_width": 1,
......@@ -563,13 +481,16 @@
"_name": "invalid-name_2",
"_objFlags": 0,
"_parent": {
"__id__": 7
"__id__": 5
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 12
"__id__": 10
},
{
"__id__": 11
}
],
"_prefab": null,
......@@ -596,7 +517,7 @@
"ctor": "Float64Array",
"array": [
0,
-44,
-45.5,
0,
0,
0,
......@@ -625,7 +546,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 11
"__id__": 9
},
"_enabled": true,
"_materials": [
......@@ -652,6 +573,27 @@
"_atlas": null,
"_id": "bahXJibU5HqZMrCuGhbuP6"
},
{
"__type__": "85b1fp6d6BIEYtigmp8p3x+",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 9
},
"_enabled": true,
"r_width": 1,
"r_height": 1,
"r_top": 0,
"r_bottom": 0,
"p_left": 0,
"p_right": 0,
"p_top": 0,
"p_bottom": 1,
"black": 0,
"noHead": 0,
"debug": 0,
"_id": "c0Fj3pVLRAQ5fE3Ob6H8hI"
},
{
"__type__": "cc.Node",
"_name": "title",
......@@ -661,14 +603,18 @@
},
"_children": [
{
"__id__": 14
"__id__": 13
},
{
"__id__": 16
"__id__": 15
}
],
"_active": true,
"_components": [],
"_components": [
{
"__id__": 18
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
......@@ -722,13 +668,13 @@
"_name": "bg",
"_objFlags": 0,
"_parent": {
"__id__": 13
"__id__": 12
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 15
"__id__": 14
}
],
"_prefab": null,
......@@ -743,7 +689,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 502,
"height": 115
"height": 76
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -784,7 +730,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 14
"__id__": 13
},
"_enabled": true,
"_materials": [
......@@ -816,16 +762,16 @@
"_name": "txt",
"_objFlags": 0,
"_parent": {
"__id__": 13
"__id__": 12
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 17
"__id__": 16
},
{
"__id__": 18
"__id__": 17
}
],
"_prefab": null,
......@@ -839,8 +785,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 178.06,
"height": 56.4
"width": 362.57,
"height": 53.4
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -851,8 +797,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
21.035,
12.246,
33.296,
4.551,
0,
0,
0,
......@@ -881,7 +827,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 16
"__id__": 15
},
"_enabled": true,
"_materials": [
......@@ -891,13 +837,13 @@
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "Compare",
"_N$string": "Compare",
"_fontSize": 42,
"_string": "Read and classify the words",
"_N$string": "Read and classify the words",
"_fontSize": 27,
"_lineHeight": 40,
"_enableWrapText": true,
"_N$file": {
"__uuid__": "c551970e-b095-45f3-9f1d-25cde8b8deb1"
"__uuid__": "f0adf7cd-b2db-4a5a-87fe-4d818a6a6b89"
},
"_isSystemFontUsed": false,
"_spacingX": 0,
......@@ -916,19 +862,40 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 16
"__id__": 15
},
"_enabled": true,
"_color": {
"__type__": "cc.Color",
"r": 166,
"g": 60,
"b": 28,
"r": 136,
"g": 90,
"b": 0,
"a": 255
},
"_width": 3,
"_width": 1.5,
"_id": "7eorOc0eJBL7kuwjKM7Nul"
},
{
"__type__": "85b1fp6d6BIEYtigmp8p3x+",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 12
},
"_enabled": true,
"r_width": 0,
"r_height": 0,
"r_top": 0,
"r_bottom": 0,
"p_left": 0,
"p_right": 0,
"p_top": 1,
"p_bottom": 0,
"black": 0,
"noHead": 0,
"debug": 0,
"_id": "4eatYVtk5HwLfMuLXgp/sS"
},
{
"__type__": "cc.Node",
"_name": "line",
......@@ -2334,7 +2301,7 @@
},
{
"__type__": "cc.Node",
"_name": "box",
"_name": "main",
"_objFlags": 0,
"_parent": {
"__id__": 2
......@@ -2344,19 +2311,10 @@
"__id__": 47
},
{
"__id__": 54
},
{
"__id__": 61
},
{
"__id__": 67
},
{
"__id__": 75
"__id__": 53
},
{
"__id__": 77
"__id__": 59
}
],
"_active": true,
......@@ -2427,7 +2385,7 @@
"_active": true,
"_components": [
{
"__id__": 53
"__id__": 52
}
],
"_prefab": null,
......@@ -2584,9 +2542,6 @@
"_components": [
{
"__id__": 51
},
{
"__id__": 52
}
],
"_prefab": null,
......@@ -2600,8 +2555,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 178.06,
"height": 56.4
"width": 140.27,
"height": 50.4
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -2652,13 +2607,13 @@
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "Compare",
"_N$string": "Compare",
"_string": "animal",
"_N$string": "animal",
"_fontSize": 42,
"_lineHeight": 40,
"_enableWrapText": true,
"_N$file": {
"__uuid__": "c551970e-b095-45f3-9f1d-25cde8b8deb1"
"__uuid__": "f792997f-f029-4df1-9adb-5e28c3e1a1c4"
},
"_isSystemFontUsed": false,
"_spacingX": 0,
......@@ -2672,24 +2627,6 @@
"_N$cacheMode": 0,
"_id": "e94TUSrRxLwoxQpQFZLleL"
},
{
"__type__": "cc.LabelOutline",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 50
},
"_enabled": true,
"_color": {
"__type__": "cc.Color",
"r": 166,
"g": 60,
"b": 28,
"a": 255
},
"_width": 3,
"_id": "e8durAReZPqpm6vjPXyPQe"
},
{
"__type__": "cc.Sprite",
"_name": "",
......@@ -2731,16 +2668,16 @@
},
"_children": [
{
"__id__": 55
"__id__": 54
},
{
"__id__": 57
"__id__": 56
}
],
"_active": true,
"_components": [
{
"__id__": 60
"__id__": 58
}
],
"_prefab": null,
......@@ -2796,13 +2733,13 @@
"_name": "combined-shape_3",
"_objFlags": 0,
"_parent": {
"__id__": 54
"__id__": 53
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 56
"__id__": 55
}
],
"_prefab": null,
......@@ -2858,7 +2795,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 55
"__id__": 54
},
"_enabled": true,
"_materials": [
......@@ -2890,16 +2827,13 @@
"_name": "txt",
"_objFlags": 0,
"_parent": {
"__id__": 54
"__id__": 53
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 58
},
{
"__id__": 59
"__id__": 57
}
],
"_prefab": null,
......@@ -2913,8 +2847,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 178.06,
"height": 56.4
"width": 103.32,
"height": 50.4
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -2955,7 +2889,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 57
"__id__": 56
},
"_enabled": true,
"_materials": [
......@@ -2965,13 +2899,13 @@
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "Compare",
"_N$string": "Compare",
"_string": "plant",
"_N$string": "plant",
"_fontSize": 42,
"_lineHeight": 40,
"_enableWrapText": true,
"_N$file": {
"__uuid__": "c551970e-b095-45f3-9f1d-25cde8b8deb1"
"__uuid__": "f792997f-f029-4df1-9adb-5e28c3e1a1c4"
},
"_isSystemFontUsed": false,
"_spacingX": 0,
......@@ -2985,30 +2919,12 @@
"_N$cacheMode": 0,
"_id": "352Zi2NBJGYKeMbWzimzMd"
},
{
"__type__": "cc.LabelOutline",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 57
},
"_enabled": true,
"_color": {
"__type__": "cc.Color",
"r": 166,
"g": 60,
"b": 28,
"a": 255
},
"_width": 3,
"_id": "d44DakQ/JPUoXuzE8o37p0"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 54
"__id__": 53
},
"_enabled": true,
"_materials": [
......@@ -3044,10 +2960,10 @@
},
"_children": [
{
"__id__": 62
"__id__": 60
},
{
"__id__": 64
"__id__": 62
}
],
"_active": true,
......@@ -3105,13 +3021,13 @@
"_name": "oval-18",
"_objFlags": 0,
"_parent": {
"__id__": 61
"__id__": 59
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 63
"__id__": 61
}
],
"_prefab": null,
......@@ -3167,7 +3083,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 62
"__id__": 60
},
"_enabled": true,
"_materials": [
......@@ -3199,16 +3115,13 @@
"_name": "txt",
"_objFlags": 0,
"_parent": {
"__id__": 61
"__id__": 59
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 65
},
{
"__id__": 66
"__id__": 63
}
],
"_prefab": null,
......@@ -3222,8 +3135,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 178.06,
"height": 56.4
"width": 93.25,
"height": 50.4
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -3264,7 +3177,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 64
"__id__": 62
},
"_enabled": true,
"_materials": [
......@@ -3274,13 +3187,13 @@
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "Compare",
"_N$string": "Compare",
"_string": "food",
"_N$string": "food",
"_fontSize": 42,
"_lineHeight": 40,
"_enableWrapText": true,
"_N$file": {
"__uuid__": "c551970e-b095-45f3-9f1d-25cde8b8deb1"
"__uuid__": "f792997f-f029-4df1-9adb-5e28c3e1a1c4"
},
"_isSystemFontUsed": false,
"_spacingX": 0,
......@@ -3294,44 +3207,20 @@
"_N$cacheMode": 0,
"_id": "4dOWUWrcJLNoAOLcPD5MkO"
},
{
"__type__": "cc.LabelOutline",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 64
},
"_enabled": true,
"_color": {
"__type__": "cc.Color",
"r": 166,
"g": 60,
"b": 28,
"a": 255
},
"_width": 3,
"_id": "a16GgfecdEI6fIEAKQ7SZv"
},
{
"__type__": "cc.Node",
"_name": "son_0",
"_name": "box",
"_objFlags": 0,
"_parent": {
"__id__": 46
"__id__": 2
},
"_children": [
{
"__id__": 68
},
{
"__id__": 70
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 72
"__id__": 65
}
],
"_active": false,
"_components": [],
"_prefab": null,
"_opacity": 255,
"_color": {
......@@ -3343,8 +3232,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
"width": 163,
"height": 185
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -3355,8 +3244,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-480.143,
73.98,
-482,
-62,
0,
0,
0,
......@@ -3378,22 +3267,50 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "0cGfCwNORMAovWEce1NbJS"
"_id": "d0IbZt0iREuJ+49WaUGTP8"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 64
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "7cffa85e-7b5a-48a2-b387-48ae1288c639"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "35P4c5oZZGcKzSvz6/d+ML"
},
{
"__type__": "cc.Node",
"_name": "bg_blue",
"_name": "boxs",
"_objFlags": 0,
"_parent": {
"__id__": 67
"__id__": 2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 69
}
],
"_components": [],
"_prefab": null,
"_opacity": 255,
"_color": {
......@@ -3405,8 +3322,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 186,
"height": 75
"width": 1280,
"height": 720
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -3440,54 +3357,28 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "413tmps8BHI5gKGmqCHEEt"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 68
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "43bb4581-6acd-4928-9a46-b10ee983cb60"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "ea7ZSYdwtPw6UckdyAyhXU"
"_id": "b1f2wt9v9A17ih/d0Ampr8"
},
{
"__type__": "cc.Node",
"_name": "bg_green",
"_name": "son",
"_objFlags": 0,
"_parent": {
"__id__": 67
"__id__": 2
},
"_children": [],
"_active": true,
"_components": [
"_children": [
{
"__id__": 71
"__id__": 68
},
{
"__id__": 70
},
{
"__id__": 72
}
],
"_active": false,
"_components": [],
"_prefab": null,
"_opacity": 255,
"_color": {
......@@ -3499,8 +3390,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 186,
"height": 75
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -3511,8 +3402,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
-480.143,
73.98,
0,
0,
0,
......@@ -3534,43 +3425,11 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "19UV46mq1FGYThiWgQk9Eo"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 70
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "49454315-2fbc-49d7-980b-03990d784088"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "c0Fp2hxP5Lf7vYluaP31SL"
"_id": "ed3u/ou8BNkKWG8f9u0yO/"
},
{
"__type__": "cc.Node",
"_name": "txt",
"_name": "bg_blue",
"_objFlags": 0,
"_parent": {
"__id__": 67
......@@ -3579,10 +3438,7 @@
"_active": true,
"_components": [
{
"__id__": 73
},
{
"__id__": 74
"__id__": 69
}
],
"_prefab": null,
......@@ -3596,8 +3452,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 149.38,
"height": 56.4
"width": 186,
"height": 75
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -3608,8 +3464,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-1.798,
4.552,
0,
0,
0,
0,
0,
......@@ -3631,14 +3487,14 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "94pUu7zdlM3JrMf1qZVXEx"
"_id": "155/Tz005JJKvYW+VT9WA/"
},
{
"__type__": "cc.Label",
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 72
"__id__": 68
},
"_enabled": true,
"_materials": [
......@@ -3648,56 +3504,35 @@
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "Compare",
"_N$string": "Compare",
"_fontSize": 35,
"_lineHeight": 40,
"_enableWrapText": true,
"_N$file": {
"__uuid__": "c551970e-b095-45f3-9f1d-25cde8b8deb1"
},
"_isSystemFontUsed": false,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 0,
"_underlineHeight": 0,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "38wAsXpXhHaoiTefyKoQIX"
},
{
"__type__": "cc.LabelOutline",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 72
"_spriteFrame": {
"__uuid__": "43bb4581-6acd-4928-9a46-b10ee983cb60"
},
"_enabled": true,
"_color": {
"__type__": "cc.Color",
"r": 166,
"g": 60,
"b": 28,
"a": 255
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_width": 3,
"_id": "09DEDGjKlKuYmAY+UKFVUO"
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "48+85Y6DJLbpgeLQgrIMer"
},
{
"__type__": "cc.Node",
"_name": "box_0",
"_name": "bg_green",
"_objFlags": 0,
"_parent": {
"__id__": 46
"__id__": 67
},
"_children": [],
"_active": false,
"_active": true,
"_components": [
{
"__id__": 76
"__id__": 71
}
],
"_prefab": null,
......@@ -3711,8 +3546,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 163,
"height": 185
"width": 186,
"height": 75
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -3723,8 +3558,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-482,
-62,
0,
0,
0,
0,
0,
......@@ -3746,14 +3581,14 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "5316jBR5BFr4fFuW1+BG3x"
"_id": "c3L7Ws7HVEAZe0COsMmBuu"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 75
"__id__": 70
},
"_enabled": true,
"_materials": [
......@@ -3764,7 +3599,7 @@
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "7cffa85e-7b5a-48a2-b387-48ae1288c639"
"__uuid__": "49454315-2fbc-49d7-980b-03990d784088"
},
"_type": 0,
"_sizeMode": 1,
......@@ -3778,20 +3613,20 @@
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "e5jUb+xyFCDJ3gu/exX/E9"
"_id": "3bi+lVE/JLooXsOnQLkjcq"
},
{
"__type__": "cc.Node",
"_name": "box_1",
"_name": "txt",
"_objFlags": 0,
"_parent": {
"__id__": 46
"__id__": 67
},
"_children": [],
"_active": false,
"_active": true,
"_components": [
{
"__id__": 78
"__id__": 73
}
],
"_prefab": null,
......@@ -3799,14 +3634,14 @@
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"g": 247,
"b": 177,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 163,
"height": 185
"width": 150,
"height": 50.4
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -3817,8 +3652,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-290,
-62,
-1.798,
4.552,
0,
0,
0,
......@@ -3840,14 +3675,14 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "e5sTPVB4hPHIscCOvugnI3"
"_id": "2cQXHYyNJMU5vCdR3kSnT3"
},
{
"__type__": "cc.Sprite",
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 77
"__id__": 72
},
"_enabled": true,
"_materials": [
......@@ -3857,35 +3692,34 @@
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "7cffa85e-7b5a-48a2-b387-48ae1288c639"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
"_string": "Compare",
"_N$string": "Compare",
"_fontSize": 28,
"_lineHeight": 40,
"_enableWrapText": true,
"_N$file": {
"__uuid__": "f792997f-f029-4df1-9adb-5e28c3e1a1c4"
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "28JBgxiU5BnIb9e8RORRpG"
"_isSystemFontUsed": false,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 0,
"_underlineHeight": 0,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 2,
"_N$cacheMode": 0,
"_id": "3e8K9UCwlJnYOUZovAaY0F"
},
{
"__type__": "cc.Node",
"_name": "items",
"_name": "sons",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [
{
"__id__": 80
}
],
"_children": [],
"_active": true,
"_components": [],
"_prefab": null,
......@@ -3934,39 +3768,39 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "2bxgAtmQJP+bUQoreYMry9"
"_id": "26PDzTuTxB/pd4EcGtY9gJ"
},
{
"__type__": "cc.Node",
"_name": "item",
"_objFlags": 0,
"_parent": {
"__id__": 79
"__id__": 2
},
"_children": [
{
"__id__": 81
"__id__": 76
},
{
"__id__": 83
"__id__": 78
},
{
"__id__": 85
"__id__": 80
},
{
"__id__": 87
"__id__": 82
},
{
"__id__": 89
"__id__": 84
},
{
"__id__": 91
"__id__": 86
}
],
"_active": false,
"_components": [
{
"__id__": 97
"__id__": 92
}
],
"_prefab": null,
......@@ -4022,13 +3856,13 @@
"_name": "bg",
"_objFlags": 0,
"_parent": {
"__id__": 80
"__id__": 75
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 82
"__id__": 77
}
],
"_prefab": null,
......@@ -4084,7 +3918,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 81
"__id__": 76
},
"_enabled": true,
"_materials": [
......@@ -4116,13 +3950,13 @@
"_name": "chose",
"_objFlags": 0,
"_parent": {
"__id__": 80
"__id__": 75
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 84
"__id__": 79
}
],
"_prefab": null,
......@@ -4178,7 +4012,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 83
"__id__": 78
},
"_enabled": true,
"_materials": [
......@@ -4210,13 +4044,13 @@
"_name": "fail",
"_objFlags": 0,
"_parent": {
"__id__": 80
"__id__": 75
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 86
"__id__": 81
}
],
"_prefab": null,
......@@ -4272,7 +4106,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 85
"__id__": 80
},
"_enabled": true,
"_materials": [
......@@ -4304,13 +4138,13 @@
"_name": "icon",
"_objFlags": 0,
"_parent": {
"__id__": 80
"__id__": 75
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 88
"__id__": 83
}
],
"_prefab": null,
......@@ -4366,7 +4200,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 87
"__id__": 82
},
"_enabled": true,
"_materials": [
......@@ -4398,22 +4232,22 @@
"_name": "txt",
"_objFlags": 0,
"_parent": {
"__id__": 80
"__id__": 75
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 90
"__id__": 85
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 166,
"g": 60,
"b": 28,
"r": 150,
"g": 89,
"b": 37,
"a": 255
},
"_contentSize": {
......@@ -4460,7 +4294,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 89
"__id__": 84
},
"_enabled": true,
"_materials": [
......@@ -4470,13 +4304,13 @@
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "milk",
"_N$string": "milk",
"_string": "chicken",
"_N$string": "chicken",
"_fontSize": 38,
"_lineHeight": 40,
"_enableWrapText": true,
"_N$file": {
"__uuid__": "c551970e-b095-45f3-9f1d-25cde8b8deb1"
"__uuid__": "5d8c6a7f-89af-4150-a1e1-c687492e05c3"
},
"_isSystemFontUsed": false,
"_spacingX": 0,
......@@ -4495,20 +4329,20 @@
"_name": "success",
"_objFlags": 0,
"_parent": {
"__id__": 80
"__id__": 75
},
"_children": [
{
"__id__": 92
"__id__": 87
},
{
"__id__": 94
"__id__": 89
}
],
"_active": false,
"_components": [
{
"__id__": 96
"__id__": 91
}
],
"_prefab": null,
......@@ -4564,22 +4398,22 @@
"_name": "txt",
"_objFlags": 0,
"_parent": {
"__id__": 91
"__id__": 86
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 93
"__id__": 88
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 166,
"g": 60,
"b": 28,
"r": 150,
"g": 89,
"b": 37,
"a": 255
},
"_contentSize": {
......@@ -4626,7 +4460,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 92
"__id__": 87
},
"_enabled": true,
"_materials": [
......@@ -4642,7 +4476,7 @@
"_lineHeight": 30,
"_enableWrapText": true,
"_N$file": {
"__uuid__": "c551970e-b095-45f3-9f1d-25cde8b8deb1"
"__uuid__": "5d8c6a7f-89af-4150-a1e1-c687492e05c3"
},
"_isSystemFontUsed": false,
"_spacingX": 0,
......@@ -4661,13 +4495,13 @@
"_name": "icon",
"_objFlags": 0,
"_parent": {
"__id__": 91
"__id__": 86
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 95
"__id__": 90
}
],
"_prefab": null,
......@@ -4723,7 +4557,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 94
"__id__": 89
},
"_enabled": true,
"_materials": [
......@@ -4755,7 +4589,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 91
"__id__": 86
},
"_enabled": true,
"_materials": [
......@@ -4787,7 +4621,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 80
"__id__": 75
},
"_enabled": true,
"_normalMaterial": null,
......@@ -4848,10 +4682,93 @@
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": {
"__id__": 80
"__id__": 75
},
"_id": "58IQ76yf1KT71BqZoNtHOV"
},
{
"__type__": "cc.Node",
"_name": "items",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 94
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1280,
"height": 720
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "2bxgAtmQJP+bUQoreYMry9"
},
{
"__type__": "85b1fp6d6BIEYtigmp8p3x+",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 93
},
"_enabled": true,
"r_width": 0,
"r_height": 0,
"r_top": 0,
"r_bottom": 0,
"p_left": 0,
"p_right": 0,
"p_top": 0,
"p_bottom": 1,
"black": 0,
"noHead": 0,
"debug": 0,
"_id": "ebQ2jKaixDO7nZRIohsaP7"
},
{
"__type__": "cc.Node",
"_name": "btn_replay",
......@@ -4863,10 +4780,10 @@
"_active": false,
"_components": [
{
"__id__": 99
"__id__": 96
},
{
"__id__": 100
"__id__": 97
}
],
"_prefab": null,
......@@ -4893,7 +4810,7 @@
"ctor": "Float64Array",
"array": [
0,
0,
-241.046,
0,
0,
0,
......@@ -4922,7 +4839,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 98
"__id__": 95
},
"_enabled": true,
"_materials": [
......@@ -4954,7 +4871,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 98
"__id__": 95
},
"_enabled": true,
"_normalMaterial": null,
......@@ -5015,7 +4932,7 @@
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": {
"__id__": 98
"__id__": 95
},
"_id": "86ErSTSUhP26kFUGhhqqPn"
},
......@@ -5030,10 +4947,10 @@
"_active": true,
"_components": [
{
"__id__": 102
"__id__": 99
},
{
"__id__": 103
"__id__": 100
}
],
"_prefab": null,
......@@ -5089,7 +5006,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 101
"__id__": 98
},
"_enabled": true,
"_layoutSize": {
......@@ -5121,7 +5038,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 101
"__id__": 98
},
"_enabled": true,
"alignMode": 1,
......@@ -5270,7 +5187,7 @@
"_active": true,
"_components": [
{
"__id__": 107
"__id__": 104
}
],
"_prefab": null,
......@@ -5326,7 +5243,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 106
"__id__": 103
},
"_enabled": true,
"_materials": [
......@@ -5370,13 +5287,13 @@
},
"_children": [
{
"__id__": 109
"__id__": 106
}
],
"_active": true,
"_components": [
{
"__id__": 113
"__id__": 110
}
],
"_prefab": null,
......@@ -5432,17 +5349,17 @@
"_name": "Star",
"_objFlags": 0,
"_parent": {
"__id__": 108
"__id__": 105
},
"_children": [
{
"__id__": 110
"__id__": 107
}
],
"_active": false,
"_components": [
{
"__id__": 112
"__id__": 109
}
],
"_prefab": null,
......@@ -5498,13 +5415,13 @@
"_name": "StarBig",
"_objFlags": 0,
"_parent": {
"__id__": 109
"__id__": 106
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 111
"__id__": 108
}
],
"_prefab": null,
......@@ -5560,7 +5477,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 110
"__id__": 107
},
"_enabled": true,
"_materials": [
......@@ -5592,7 +5509,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 109
"__id__": 106
},
"_enabled": true,
"_materials": [
......@@ -5624,7 +5541,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 108
"__id__": 105
},
"_enabled": true,
"_materials": [
......@@ -5660,22 +5577,22 @@
},
"_children": [
{
"__id__": 115
"__id__": 112
},
{
"__id__": 117
"__id__": 114
},
{
"__id__": 119
"__id__": 116
},
{
"__id__": 121
"__id__": 118
},
{
"__id__": 123
"__id__": 120
},
{
"__id__": 125
"__id__": 122
}
],
"_active": true,
......@@ -5733,13 +5650,13 @@
"_name": "bg_sahua",
"_objFlags": 0,
"_parent": {
"__id__": 114
"__id__": 111
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 116
"__id__": 113
}
],
"_prefab": null,
......@@ -5795,7 +5712,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 115
"__id__": 112
},
"_enabled": true,
"_materials": [
......@@ -5827,13 +5744,13 @@
"_name": "bg_sahua",
"_objFlags": 0,
"_parent": {
"__id__": 114
"__id__": 111
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 118
"__id__": 115
}
],
"_prefab": null,
......@@ -5889,7 +5806,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 117
"__id__": 114
},
"_enabled": true,
"_materials": [
......@@ -5921,13 +5838,13 @@
"_name": "bg_sahua",
"_objFlags": 0,
"_parent": {
"__id__": 114
"__id__": 111
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 120
"__id__": 117
}
],
"_prefab": null,
......@@ -5983,7 +5900,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 119
"__id__": 116
},
"_enabled": true,
"_materials": [
......@@ -6015,13 +5932,13 @@
"_name": "bg_sahua",
"_objFlags": 0,
"_parent": {
"__id__": 114
"__id__": 111
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 122
"__id__": 119
}
],
"_prefab": null,
......@@ -6077,7 +5994,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 121
"__id__": 118
},
"_enabled": true,
"_materials": [
......@@ -6109,13 +6026,13 @@
"_name": "bg_sahua",
"_objFlags": 0,
"_parent": {
"__id__": 114
"__id__": 111
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 124
"__id__": 121
}
],
"_prefab": null,
......@@ -6171,7 +6088,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 123
"__id__": 120
},
"_enabled": true,
"_materials": [
......@@ -6203,13 +6120,13 @@
"_name": "bg_sahua",
"_objFlags": 0,
"_parent": {
"__id__": 114
"__id__": 111
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 126
"__id__": 123
}
],
"_prefab": null,
......@@ -6265,7 +6182,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 125
"__id__": 122
},
"_enabled": true,
"_materials": [
......@@ -6301,19 +6218,19 @@
},
"_children": [
{
"__id__": 128
"__id__": 125
},
{
"__id__": 133
"__id__": 130
},
{
"__id__": 138
"__id__": 135
},
{
"__id__": 143
"__id__": 140
},
{
"__id__": 148
"__id__": 145
}
],
"_active": true,
......@@ -6371,11 +6288,11 @@
"_name": "quadBase",
"_objFlags": 0,
"_parent": {
"__id__": 127
"__id__": 124
},
"_children": [
{
"__id__": 129
"__id__": 126
}
],
"_active": true,
......@@ -6433,17 +6350,17 @@
"_name": "quad",
"_objFlags": 0,
"_parent": {
"__id__": 128
"__id__": 125
},
"_children": [
{
"__id__": 130
"__id__": 127
}
],
"_active": true,
"_components": [
{
"__id__": 132
"__id__": 129
}
],
"_prefab": null,
......@@ -6499,13 +6416,13 @@
"_name": "paper",
"_objFlags": 0,
"_parent": {
"__id__": 129
"__id__": 126
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 131
"__id__": 128
}
],
"_prefab": null,
......@@ -6561,7 +6478,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 130
"__id__": 127
},
"_enabled": true,
"_materials": [
......@@ -6593,7 +6510,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 129
"__id__": 126
},
"_enabled": true,
"_materials": [
......@@ -6615,11 +6532,11 @@
"_name": "quadBase",
"_objFlags": 0,
"_parent": {
"__id__": 127
"__id__": 124
},
"_children": [
{
"__id__": 134
"__id__": 131
}
],
"_active": true,
......@@ -6677,17 +6594,17 @@
"_name": "quad",
"_objFlags": 0,
"_parent": {
"__id__": 133
"__id__": 130
},
"_children": [
{
"__id__": 135
"__id__": 132
}
],
"_active": true,
"_components": [
{
"__id__": 137
"__id__": 134
}
],
"_prefab": null,
......@@ -6743,13 +6660,13 @@
"_name": "paper",
"_objFlags": 0,
"_parent": {
"__id__": 134
"__id__": 131
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 136
"__id__": 133
}
],
"_prefab": null,
......@@ -6805,7 +6722,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 135
"__id__": 132
},
"_enabled": true,
"_materials": [
......@@ -6837,7 +6754,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 134
"__id__": 131
},
"_enabled": true,
"_materials": [
......@@ -6859,11 +6776,11 @@
"_name": "quadBase",
"_objFlags": 0,
"_parent": {
"__id__": 127
"__id__": 124
},
"_children": [
{
"__id__": 139
"__id__": 136
}
],
"_active": true,
......@@ -6921,17 +6838,17 @@
"_name": "quad",
"_objFlags": 0,
"_parent": {
"__id__": 138
"__id__": 135
},
"_children": [
{
"__id__": 140
"__id__": 137
}
],
"_active": true,
"_components": [
{
"__id__": 142
"__id__": 139
}
],
"_prefab": null,
......@@ -6987,13 +6904,13 @@
"_name": "paper",
"_objFlags": 0,
"_parent": {
"__id__": 139
"__id__": 136
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 141
"__id__": 138
}
],
"_prefab": null,
......@@ -7049,7 +6966,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 140
"__id__": 137
},
"_enabled": true,
"_materials": [
......@@ -7081,7 +6998,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 139
"__id__": 136
},
"_enabled": true,
"_materials": [
......@@ -7103,11 +7020,11 @@
"_name": "quadBase",
"_objFlags": 0,
"_parent": {
"__id__": 127
"__id__": 124
},
"_children": [
{
"__id__": 144
"__id__": 141
}
],
"_active": true,
......@@ -7165,17 +7082,17 @@
"_name": "quad",
"_objFlags": 0,
"_parent": {
"__id__": 143
"__id__": 140
},
"_children": [
{
"__id__": 145
"__id__": 142
}
],
"_active": true,
"_components": [
{
"__id__": 147
"__id__": 144
}
],
"_prefab": null,
......@@ -7231,13 +7148,13 @@
"_name": "paper",
"_objFlags": 0,
"_parent": {
"__id__": 144
"__id__": 141
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 146
"__id__": 143
}
],
"_prefab": null,
......@@ -7293,7 +7210,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 145
"__id__": 142
},
"_enabled": true,
"_materials": [
......@@ -7325,7 +7242,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 144
"__id__": 141
},
"_enabled": true,
"_materials": [
......@@ -7347,11 +7264,11 @@
"_name": "quadBase",
"_objFlags": 0,
"_parent": {
"__id__": 127
"__id__": 124
},
"_children": [
{
"__id__": 149
"__id__": 146
}
],
"_active": true,
......@@ -7409,17 +7326,17 @@
"_name": "quad",
"_objFlags": 0,
"_parent": {
"__id__": 148
"__id__": 145
},
"_children": [
{
"__id__": 150
"__id__": 147
}
],
"_active": true,
"_components": [
{
"__id__": 152
"__id__": 149
}
],
"_prefab": null,
......@@ -7475,13 +7392,13 @@
"_name": "paper",
"_objFlags": 0,
"_parent": {
"__id__": 149
"__id__": 146
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 151
"__id__": 148
}
],
"_prefab": null,
......@@ -7537,7 +7454,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 150
"__id__": 147
},
"_enabled": true,
"_materials": [
......@@ -7569,7 +7486,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 149
"__id__": 146
},
"_enabled": true,
"_materials": [
......@@ -7597,7 +7514,7 @@
"_active": true,
"_components": [
{
"__id__": 154
"__id__": 151
}
],
"_prefab": null,
......@@ -7653,7 +7570,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 153
"__id__": 150
},
"_enabled": true,
"_clip": {
......@@ -7678,7 +7595,7 @@
"_active": true,
"_components": [
{
"__id__": 156
"__id__": 153
}
],
"_prefab": null,
......@@ -7734,7 +7651,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 155
"__id__": 152
},
"_enabled": true,
"_clip": {
......@@ -7759,7 +7676,7 @@
"_active": true,
"_components": [
{
"__id__": 158
"__id__": 155
}
],
"_prefab": null,
......@@ -7815,7 +7732,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 157
"__id__": 154
},
"_enabled": true,
"_clip": {
......
......@@ -162,7 +162,7 @@ cc.Class({
this._zhuClass = GameManager.getIns().getZhuClass();
// 所有全局变量 默认都是null
this._cantouch = true;
this._cantouch = 0;
//界面用数据
this._cardTouchItems = [];
this._successItems = [];
......@@ -173,10 +173,9 @@ cc.Class({
},
initView() {
// this.btn_replay = pg.view.find(this, "btn_replay");
// pg.view.visible(this.btn_replay, false);
// pg.view.touchOn(this.btn_replay, this.onTouchReplay, this);
// this.initStars();
this.btn_replay = pg.view.find(this, "btn_replay");
pg.view.visible(this.btn_replay, false);
pg.view.touchOn(this.btn_replay, this.onTouchReplay, this);
this.initLayout();
},
initStars() {
......@@ -187,10 +186,10 @@ cc.Class({
//根据当前显示用数据来执行对应的效果
pg.view.setString(pg.view.find(this, "title/txt"), this._title);
//刷新主类
pg.view.setString(pg.view.find(this, "box/main/txt"), this._zhuClass.title);
pg.view.setString(pg.view.find(this, "main/main/txt"), this._zhuClass.title);
//刷新分类
pg.view.setString(pg.view.find(this, "box/sub_0/txt"), this._zhuClass.child[0].title);
pg.view.setString(pg.view.find(this, "box/sub_1/txt"), this._zhuClass.child[1].title);
pg.view.setString(pg.view.find(this, "main/sub_0/txt"), this._zhuClass.child[0].title);
pg.view.setString(pg.view.find(this, "main/sub_1/txt"), this._zhuClass.child[1].title);
this.initSon();
this.initLine();
this.initBox();
......@@ -198,11 +197,12 @@ cc.Class({
},
initSon() {
//刷新子类
let item = pg.view.find(this, "box/son_0");
let parent = pg.view.find(this, "box");
let item = pg.view.find(this, "son");
let parent = pg.view.find(this, "sons");
let list1 = this._zhuClass.child[0];
let list2 = this._zhuClass.child[1];
let list = list1.child.concat(list2.child);
pg.view.removChildren(parent);
let arr = [];
let arr1 = [];
let arr2 = [];
......@@ -210,12 +210,14 @@ cc.Class({
arr1.push(1);
arr1.push(0);
arr1.push(2);
arr1.push(3);
arr1.length = list1.child.length;
}
if (list2.child.length > 0) {
arr2.push(4);
arr2.push(5);
arr2.push(3);
arr2.push(2);
arr2.length = list2.child.length;
}
arr = arr1.concat(arr2);
......@@ -253,19 +255,20 @@ cc.Class({
//line显示
pg.view.visible(pg.view.find(parent, "line0"), list1.child.length >= 2);
pg.view.visible(pg.view.find(parent, "line1"), list1.child.length >= 1);
pg.view.visible(pg.view.find(parent, "line2"), list1.child.length >= 3);
pg.view.visible(pg.view.find(parent, "line3"), list2.child.length >= 3);
pg.view.visible(pg.view.find(parent, "line2"), list1.child.length >= 3 || list2.child.length >= 4);
pg.view.visible(pg.view.find(parent, "line3"), list2.child.length >= 3 || list1.child.length >= 4);
pg.view.visible(pg.view.find(parent, "line4"), list2.child.length >= 1);
pg.view.visible(pg.view.find(parent, "line5"), list2.child.length >= 2);
},
initBox() {
this._boxItems = [];
//刷新子类
let son = pg.view.find(this, "box/box_0");
let box = pg.view.find(this, "box");
let son = pg.view.find(this, "box");
let box = pg.view.find(this, "boxs");
let list1 = this._zhuClass.child[0];
let list2 = this._zhuClass.child[1];
let sonleis = list1.child.concat(list2.child);
pg.view.removChildren(box);
let arr = [];
let arr1 = [];
......@@ -274,12 +277,14 @@ cc.Class({
arr1.push(1);
arr1.push(0);
arr1.push(2);
arr1.push(3);
arr1.length = list1.child.length;
}
if (list2.child.length > 0) {
arr2.push(4);
arr2.push(5);
arr2.push(3);
arr2.push(2);
arr2.length = list2.child.length;
}
arr = arr1.concat(arr2);
......@@ -313,31 +318,48 @@ cc.Class({
arr1.push(1);
arr1.push(0);
arr1.push(2);
arr1.push(3);
arr1.length = list1.child.length;
}
if (list2.child.length > 0) {
arr2.push(4);
arr2.push(5);
arr2.push(3);
arr2.push(2);
arr2.length = list2.child.length;
}
arr = arr1.concat(arr2);
arr.sort();
let moveY = this.resizeInfo().moveY;
let scale = item.scale;
let itemA = box.data.id % 100 - 1;//坐标x
let itemB = box.data.success.length - 1;//坐标y
let x = -480;//-290
let addX = 190;
let y = 0;
// let addY = -40 * scale;
let addY = -43 * scale;
item.x = x + addX * arr[itemA];
item.y = y + addY * itemB;
if (scale == 1) {
let itemA = box.data.id % 100 - 1;//坐标x
let itemB = box.data.success.length - 1;//坐标y
let x = -480;//-290
let addX = 190;
let y = - moveY;
// let addY = -40 * scale;
let addY = -43 * scale;
item.x = x + addX * arr[itemA];
item.y = y + addY * itemB;
} else {
let itemA = box.data.id % 100 - 1;//坐标x
let itemB = box.data.success.length - 1;//坐标y
let x = -480;//-290
let addX = 190;
let y = - moveY;
let addY = -40
item.x = x + addX * arr[itemA];
item.y = y + addY * itemB;
}
},
initItems() {
//刷新子类
let son = pg.view.find(this, "items/item");
let son = pg.view.find(this, "item");
let box = pg.view.find(this, "items");
pg.view.removChildren(box);
GameManager.getIns().randomPageCards();
let sonleis = GameManager.getIns().getCards();
if (sonleis.length <= 14) {
let x = -500;
......@@ -475,8 +497,8 @@ cc.Class({
item.on(cc.Node.EventType.TOUCH_CANCEL, this.onCancelItem, this);
},
onStartItem(touch) {
if (!this._cantouch) return;
this._cantouch = false;
if (this._cantouch != 0) return;
this._cantouch = 1;
let item = touch.target;
if (item.moveState == 2) return;
//判断是否是在原地并没有到处移动
......@@ -486,21 +508,21 @@ cc.Class({
//2.成功效果--
//3.失败效果--
onEndItem(touch) {
// if (!this._cantouch) return;
// this._cantouch = false;
if (this._cantouch != 1) return;
this._cantouch = 2;
let item = touch.target;
if (item.moveState == 2) return;
if (item.moveState == 3) return;
let touchPos = touch.getLocation();
let touchPos = item.parent.convertToNodeSpaceAR(touch.getLocation());
//判断是否是在原地并没有到处移动
if (this.checkCollider({
x: touchPos.x - 1280 / 2,
y: touchPos.y - 720 / 2
x: touchPos.x,
y: touchPos.y
}, {
x: this._startPos.x,
y: this._startPos.y,
width: 50,//item.width,
height: 50,//item.height
width: 15,//item.width,
height: 15,//item.height
})) {
//回归原位
this.backItem(item, this._startPos);
......@@ -509,6 +531,7 @@ cc.Class({
item.cardState = item.cardState == 0 ? 1 : 0;
this.updateItem(item);
ani.flipX1(item);
this._cantouch = 0;
})
return;
}
......@@ -518,15 +541,15 @@ cc.Class({
//成功 失败的判断 根据id
let successed = box.data.child.some(dt => dt.cardId == item.data.cardId);
if (successed) {
item.moveState = 2;
this.createRightAni(cc.v2(item.x, item.y));
this.playSFX("audio_right").then(() => {
//检测是否全部完成
item.moveState = 2;
this.updateItem(item);
box.data.success.push(item);
this.setSuccessItemPos(box, item);
setTimeout(() => {
this._cantouch = true;
this._cantouch = 0;
this.groupEnd();
}, 300);
})
......@@ -537,42 +560,42 @@ cc.Class({
this.playSFX("audio_error");
setTimeout(() => {
this.backItem(item, this._startPos);
this._cantouch = true;
this._cantouch = 0;
}, 300);
}
} else {
this._cantouch = true;
this._cantouch = 0;
this.backItem(item, this._startPos);
}
},
onMoveItem(touch) {
let item = touch.target;
if (item.moveState == 2) return;
if (item.moveState == 2 || item.moveState == 3) return;
//获取到的location是 当前点击的位置 而不是按钮原本应该所在的位置。
let touchPos = touch.getLocation();
let touchPos = item.parent.convertToNodeSpaceAR(touch.getLocation());
//判断是否是在原地并没有到处移动
if (this.checkCollider({
x: touchPos.x - 1280 / 2,
y: touchPos.y - 720 / 2
x: touchPos.x,
y: touchPos.y
}, {
x: this._startPos.x,
y: this._startPos.y,
width: 30,//item.width,
height: 30,//item.height
width: 15,//item.width,
height: 15,//item.height
})) {
return;
}
item.moveState = 1;
this.updateItem(item);
touch.target.x = touchPos.x - 1280 / 2;
touch.target.y = touchPos.y - 720 / 2;
touch.target.x = touchPos.x;
touch.target.y = touchPos.y;
},
onCancelItem(touch) {
let item = touch.target;
if (item.moveState == 2) return;
//碰撞失败退回原位置
touch.target.x = this._startPos.x;
touch.target.y = this._startPos.y;
//回归原位
this._cantouch = 0;
this.backItem(item, this._startPos);
},
getCollider(item) {
for (let i = 0; i < this._boxItems.length; i++) {
......@@ -581,11 +604,67 @@ cc.Class({
return null;
},
checkCollider(item, box) {
let moveY = this.resizeInfo().moveY;
let y = item.y + moveY;
return item.x > box.x - box.width / 2
&& item.x < box.x + box.width / 2
&& item.y > box.y - box.height / 2
&& item.y < box.y + box.height / 2;
&& y > box.y - box.height / 2
&& y < box.y + box.height / 2;
},
resizeInfo() {
//0.设计尺寸
let baseSize = cc.size(1280, 720);
//1.获取屏幕尺寸
let canvasSize = cc.view.getCanvasSize();
//2.将屏幕宽高 以高度对齐的方式 换算出场景 宽度
let sumSizeW = cc.size(canvasSize.width * baseSize.height / canvasSize.height, baseSize.height)
//3.计算场景宽度与设计宽度比率
let scaleX = sumSizeW.width / baseSize.width;
//高屏幕适配
if (scaleX <= 1) {
let sumSizeY = cc.size(baseSize.width, canvasSize.height * (baseSize.width / canvasSize.width))
let scaleY = sumSizeY.height / baseSize.height;
let posY = sumSizeY.height - baseSize.height;
return {
scaleX: 1,
posX: 0,
moveX: 0,
scaleY: scaleY,
posY: posY,
moveY: - posY / 2
}
} else {
let posX = sumSizeW.width - baseSize.width;
//需要拓展的宽度缩放比
return {
scaleX: scaleX,
posX: posX,
moveX: - posX / 2,
scaleY: 1,
posY: 0,
moveY: 0
};
}
},
//回合结束
groupEnd() {
for (let i = 0; i < this._boxItems.length; i++) {
let box = this._boxItems[i];
if (box.data.success.length != box.data.child.length) return;
}
// if (this._successItems.length < this._cardPage.length) return;
if (this._gameCode != 0) return;
this._gameCode = 2;
//播放星星动画 然后结束
this.playSFX("audio_sahua");
this.createFireworkAni().then(() => {
// 游戏结束时需要调用这个方法通知系统作业完成
onHomeworkFinish();
pg.view.visible(this.btn_replay, true);
})
},
//大类 分类 小类 小类最多6个 小类child最多4个
//只有5个类的情况 左右各1类的情况 先砍中间 再砍两边
......@@ -607,29 +686,12 @@ cc.Class({
});
},
onTouchReplay() {
this.playSFX("audio_btn");
this.initData();
this.initSingleData();
pg.view.visible(this.btn_replay, false);
this.initStars();
// this.initStars();
this.initLayout();
},
//回合结束
groupEnd() {
for (let i = 0; i < this._boxItems.length; i++) {
let box = this._boxItems[i];
if (box.data.success.length != box.data.child.length) return;
}
// if (this._successItems.length < this._cardPage.length) return;
if (this._gameCode != 0) return;
this._gameCode = 2;
//播放星星动画 然后结束
this.playSFX("audio_sahua");
this.createFireworkAni().then(() => {
//gameOver
// pg.view.visible(this.btn_replay, true);
})
},
createRightAni(pos) {
let right = pg.view.find(this, 'right');
let aniRight = cc.instantiate(right);
......@@ -651,6 +713,9 @@ cc.Class({
createFireworkAni() {
return new Promise((resolve, reject) => {
this.showAllFirework(cc.find('Canvas/firework_ani'), cc.find('Canvas/paperBase').children);
setTimeout(() => {
resolve('');
}, 1000);
// showFireworks(
// cc.find('Canvas/firework_ani'),
// cc.find('Canvas/RibbonNodeBase').children,
......
......@@ -8,7 +8,7 @@
"genMipmaps": false,
"packable": true,
"width": 502,
"height": 115,
"height": 76,
"platformSettings": {},
"subMetas": {
"title_bg": {
......@@ -23,9 +23,9 @@
"trimX": 0,
"trimY": 0,
"width": 502,
"height": 115,
"height": 76,
"rawWidth": 502,
"rawHeight": 115,
"rawHeight": 76,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment