Commit fb3a8bb8 authored by linzhiguo's avatar linzhiguo

+ 脚手架

# 选择移动相关
parent 5278c1b4
export class East10{
stars : Array<Star> = [];
pages : Array<Page> = [];
kinds : Array<Kind> = [];
options : Array<Option> = [];
}
export class Star{
id : string;
title : string;
}
export class Page{
id : string;
title : string;
star_id : string;
}
export class Kind{
id : string;
word : string;
audio_url : string;
pic_url : string;
page_id : string;
//star_id : string;
}
export class Option{
word : string;
audio_url : string;
pic_url : string;
kind_id : string;
}
......@@ -6,30 +6,3 @@
height: 100%;
}
.radioPaire {
float: left;
margin: 3px;
border-style: dashed;
border-color: #000;
border-width: 1px;
}
.border {
border-radius: 20px;
border-style: dashed;
padding: 20px;
margin: 20px;
/*width: 500px; */
/*//border-radius: 20px;*/
/*//border-width: 2px;*/
/*//border-color: #000000;*/
}
.border-lite {
border: 2px dashed #ddd;
border-radius: 0.5rem;
padding: 10px;
margin: 10px;
}
<div class="model-content">
<div style="padding: 10px;">
<nz-card nzTitle="分类模板内容编辑" style="margin:5vw;" nzType="inner">
<div style="width: 300px;" align='center'>
<span>图1: </span>
<app-upload-image-with-preview
[picUrl]="item.pic_url"
(imageUploaded)="onImageUploadSuccess($event, 'pic_url')">
</app-upload-image-with-preview>
<nz-divider nzText="星" nzOrientation="left"></nz-divider>
<div nz-row>
<nz-form-item>
<nz-form-label [nzSpan]="6" nzFor="add-btn" nzNoColon=true></nz-form-label>
<nz-form-control [nzXs]='24' [nzSm]='12' [nzMd]='12' [nzLg]='6'>
<button nz-button nzType="dashed" class="add-btn" id="add-btn" (click)="addStar()">
<i nz-icon nzType="plus-circle" nzTheme="outline"></i>添加
</button>
</nz-form-control>
</nz-form-item>
</div>
<div nz-row>
<div *ngFor="let data of item.stars;let i = index" style="margin: 2vw;">
<div nz-col [nzXs]='24' [nzSm]='12' [nzMd]='12' [nzLg]='4'>
<nz-card nzTitle="星-{{i + 1}}" [nzExtra]="extraTemplate" style="height: 100px; margin: 1vw;">
</nz-card>
<ng-template #extraTemplate>
<button style="margin: 10px;" nz-button nzType="danger" (click)="delStar(i)">
<span>删除</span>
</button>
</ng-template>
</div>
</div>
</div>
<nz-divider nzText="页" nzOrientation="left"></nz-divider>
<div nz-row>
<nz-form-item>
<nz-form-label [nzSpan]="6" nzFor="add-btn" nzNoColon=true></nz-form-label>
<nz-form-control [nzXs]='24' [nzSm]='12' [nzMd]='12' [nzLg]=''>
<button nz-button nzType="dashed" class="add-btn" id="add-btn" (click)="addPage()">
<i nz-icon nzType="plus-circle" nzTheme="outline"></i>添加
</button>
</nz-form-control>
</nz-form-item>
</div>
<div nz-row>
<div *ngFor="let data of item.pages;let i = index" style="margin: 2vw;">
<div nz-col [nzXs]='24' [nzSm]='12' [nzMd]='12' [nzLg]='4'>
<nz-card nzTitle="页-{{i + 1}}" [nzExtra]="extraTemplate" style="height: 200px; margin: 1vw;">
<nz-form-item>
<nz-form-label [nzSpan]="6"></nz-form-label>
<nz-form-control [nzSpan]="12">
<nz-select [(ngModel)]="data.star_id" (ngModelChange)="setStarID($event, data)" style="width:120px" nzAllowClear>
<nz-option *ngFor="let o of item.stars let j = index" [nzValue]="o.id" [nzLabel]="'星-'+(j+1)"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</nz-card>
<ng-template #extraTemplate>
<button style="margin: 10px;" nz-button nzType="danger" (click)="delPage(i)">
<span>删除</span>
</button>
</ng-template>
</div>
<div style="width: 300px; margin-top: 5px;" align='center'>
<span>图2: </span>
<app-upload-image-with-preview
[picUrl]="item.pic_url_2"
(imageUploaded)="onImageUploadSuccess($event, 'pic_url_2')">
</app-upload-image-with-preview>
</div>
</div>
<nz-divider nzText="分组" nzOrientation="left"></nz-divider>
<div nz-row>
<nz-form-item>
<nz-form-label [nzSpan]="6" nzFor="add-btn" nzNoColon=true>分组</nz-form-label>
<nz-form-control [nzXs]='24' [nzSm]='12' [nzMd]='12' [nzLg]='6'>
<button nz-button nzType="dashed" class="add-btn" id="add-btn" (click)="addKind()">
<i nz-icon nzType="plus-circle" nzTheme="outline"></i>添加
</button>
<nz-form-item>
<nz-form-label> 建议:4个分组以内为最佳效果。图片:最佳尺寸为188*122像素</nz-form-label>
</nz-form-item>
</nz-form-control>
</nz-form-item>
</div>
<div nz-row>
<div *ngFor="let data of item.kinds;let i = index" style="margin: 2vw;">
<div nz-col [nzXs]='24' [nzSm]='12' [nzMd]='12' [nzLg]='6'>
<nz-card nzTitle="分组-{{i + 1}}" [nzExtra]="extraTemplate" style="height: 400px; margin: 1vw;">
<nz-form-item>
<nz-form-label [nzSpan]="6"></nz-form-label>
<nz-form-control [nzSpan]="12">
<nz-select [(ngModel)]="data.page_id" (ngModelChange)="setPageID($event, data)" style="width:120px" nzAllowClear>
<nz-option *ngFor="let o of item.pages let j = index" [nzValue]="o.id" [nzLabel]="'页-'+(j+1)"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSpan]="6" nzFor="{{i}}.word">文本</nz-form-label>
<nz-form-control [nzSpan]="12">
<input nz-input type="text" id="{{i}}.word" placeholder="请录入内容" [(ngModel)]="data.word" (blur)="save()">
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSpan]="6" nzFor="{{i}}.pic_url">图片</nz-form-label>
<nz-form-control [nzSpan]="12">
<app-upload-image-with-preview style="width: 100%" [picUrl]="data.pic_url"
(imageUploaded)="onImageUploadSuccess($event, data, 'pic_url')"></app-upload-image-with-preview>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSpan]="6" nzNoColon=true>声音</nz-form-label>
<nz-form-control [nzSpan]="18">
<app-audio-recorder [audioUrl]="data.audio_url"
(audioUploaded)="onAudioUploadSuccess($event, data, 'audio_url')">
</app-audio-recorder>
</nz-form-control>
</nz-form-item>
</nz-card>
<ng-template #extraTemplate>
<button style="margin: 10px;" nz-button nzType="danger" (click)="delKind(i)">
<span>删除</span>
</button>
</ng-template>
</div>
<div style="width: 300px; margin-top: 15px;">
<span>文本: </span>
<input type="text" nz-input [(ngModel)]="item.text" (blur)="save()">
</div>
</div>
<nz-divider nzText="选项" nzOrientation="left"></nz-divider>
<div nz-row>
<nz-form-item>
<nz-form-label [nzSpan]="6" nzFor="add-btn" nzNoColon=true>选项</nz-form-label>
<nz-form-control [nzXs]='24' [nzSm]='12' [nzMd]='12' [nzLg]='6'>
<button nz-button nzType="dashed" class="add-btn" id="sheep-add-btn" (click)="addOption()">
<i nz-icon nzType="plus-circle" nzTheme="outline"></i>添加
</button>
<nz-form-item>
<nz-form-label> 图片:最佳尺寸为258*174像素</nz-form-label>
</nz-form-item>
</nz-form-control>
</nz-form-item>
</div>
<div nz-row>
<div *ngFor="let data of item.options;let i = index" style="margin: 1vw;">
<div nz-col [nzXs]='24' [nzSm]='12' [nzMd]='12' [nzLg]='6'>
<nz-card nzTitle="选项-{{i + 1}}" [nzExtra]="extraTemplate" style="height: 400px; margin: 1vw;">
<nz-form-item>
<nz-form-label [nzSpan]="6">分组</nz-form-label>
<nz-form-control [nzSpan]="12">
<nz-select [(ngModel)]="data.kind_id" (ngModelChange)="setKindID($event, data)" style="width:150px" nzAllowClear>
<nz-option *ngFor="let o of item.kinds let j = index" [nzValue]="o.id" [nzLabel]="'分组-'+(j+1) +'('+o.word + ')'"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSpan]="6" nzFor="{{i}}.word">文本</nz-form-label>
<nz-form-control [nzSpan]="12">
<input nz-input type="text" id="{{i}}.word" placeholder="请录入内容" [(ngModel)]="data.word" (blur)="save()">
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSpan]="6" nzFor="{{i}}.pic_url">图片</nz-form-label>
<nz-form-control [nzSpan]="12">
<app-upload-image-with-preview style="width: 100%" [picUrl]="data.pic_url"
(imageUploaded)="onImageUploadSuccess($event, data, 'pic_url')"></app-upload-image-with-preview>
</nz-form-control>
</nz-form-item>
<div style="margin-top: 5px">
<span>音频: </span>
<app-audio-recorder
[audioUrl]="item.audio_url"
(audioUploaded)="onAudioUploadSuccess($event, 'audio_url')"
></app-audio-recorder>
<nz-form-item>
<nz-form-label [nzSpan]="6" nzNoColon=true>声音</nz-form-label>
<nz-form-control [nzSpan]="18">
<app-audio-recorder [audioUrl]="data.audio_url"
(audioUploaded)="onAudioUploadSuccess($event, data, 'audio_url')">
</app-audio-recorder>
</nz-form-control>
</nz-form-item>
</nz-card>
<ng-template #extraTemplate>
<button style="margin: 10px;" nz-button nzType="danger" (click)="delOption(i)">
<span>删除</span>
</button>
</ng-template>
</div>
</div>
</div>
</nz-card>
</div>
\ No newline at end of file
import { Component, EventEmitter, Input, OnDestroy, OnChanges, OnInit, Output, ApplicationRef, ChangeDetectorRef } from '@angular/core';
import { Star, Page, Kind, Option, East10 } from './east10';
import { ThrowStmt } from '@angular/compiler';
import { JsonPipe } from '@angular/common';
......@@ -10,32 +12,20 @@ import { JsonPipe } from '@angular/common';
export class FormComponent implements OnInit, OnChanges, OnDestroy {
// 储存数据用
saveKey = "test_001";
saveKey = "EAST-10";
// 储存对象
item;
constructor(private appRef: ApplicationRef, private changeDetectorRef: ChangeDetectorRef) {
}
createShell() {
this.item.wordList.push({
word: '',
audio: '',
backWord: '',
backWordAudio: '',
});
this.save();
}
removeShell(idx) {
this.item.wordList.splice(idx, 1);
this.save();
}
ngOnInit() {
this.item = {};
//this.item = new Course();
this.item = new East10();
// 获取存储的数据
(<any>window).courseware.getData((data) => {
......@@ -43,23 +33,29 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
if (data) {
this.item = data;
}
console.log(data);
this.init();
this.changeDetectorRef.markForCheck();
this.changeDetectorRef.detectChanges();
this.refresh();
}, this.saveKey);
console.log(this.item);
}
ngOnChanges() {
}
ngOnDestroy() {
}
init() {
init() {
if(!this.item){
this.item = new East10();
}
}
......@@ -67,37 +63,27 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
* 储存图片数据
* @param e
*/
onImageUploadSuccess(e, key) {
this.item[key] = e.url;
onImageUploadSuccess(e, item, key) {
item[key] = e.url;
this.save();
}
}
/**
/**
* 储存音频数据
* @param e
*/
onAudioUploadSuccess(e, key) {
this.item[key] = e.url;
onAudioUploadSuccess(e, item, key) {
item[key] = e.url;
this.save();
}
}
onWordAudioUploadSuccess(e, idx) {
this.item.wordList[idx].audio = e.url;
this.save();
}
onBackWordAudioUploadSuccess(e, idx) {
this.item.wordList[idx].backWordAudio = e.url;
this.save();
}
/**
* 储存数据
*/
save() {
(<any>window).courseware.setData(this.item, null, this.saveKey);
this.refresh();
console.log('this.item = ' + JSON.stringify(this.item));
}
......@@ -111,4 +97,100 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
}, 1);
}
randomChar() {
var x = "0123456789qwertyuioplkjhgfdsazxcvbnm";
var tmp = "";
var timestamp = new Date().getTime();
for (var i = 0; i < 6; i++) {
tmp += x.charAt(Math.ceil(Math.random() * 100000000) % x.length);
}
return timestamp + tmp;
}
addStar(){
let star = new Star();
star.id = this.randomChar();
this.item.stars.push(star);
this.save();
}
delStar(idx){
if (idx !== -1){
this.item.stars.splice(idx, 1);
this.save();
}
}
addPage(){
let page = new Page();
page.id = this.randomChar();
this.item.pages.push(page);
this.save();
}
delPage(idx){
if (idx !== -1){
this.item.pages.splice(idx, 1);
this.save();
}
}
addKind(){
let kind = new Kind();
kind.id = this.randomChar();
this.item.kinds.push(kind);
this.save();
}
delKind(idx){
if (idx !== -1){
this.item.kinds.splice(idx, 1);;
this.save();
}
}
addOption(){
let option = new Option();
this.item.options.push(option);
this.save();
}
delOption(idx){
if (idx !== -1){
this.item.options.splice(idx, 1);
this.save();
}
}
setStarID(e, item){
item.star_id = e;
this.save();
}
setPageID(e, item){
item.page_id = e;
this.save();
}
setKindID(e, item){
item.kind_id = e;
this.save();
}
// getIndexInArray(ar, id){
// for(let i = 0; i < ar.length; i++){
// if (ar[i].id == id){
// return i;
// }
// }
// return -1;
// }
// getStarPage(kind){
// let star_id = -1, page_id = this.getIndexInArray(this.item.pages, kind.page_id);
// if (page_id >= 0)
// star_id = this.getIndexInArray(this.item.stars, this.item.pages[page_id].star_id);
// }
}
......@@ -17,16 +17,16 @@
"__id__": 2
},
{
"__id__": 139
"__id__": 140
},
{
"__id__": 152
"__id__": 153
},
{
"__id__": 37
"__id__": 38
},
{
"__id__": 158
"__id__": 159
}
],
"_active": false,
......@@ -93,43 +93,43 @@
"__id__": 11
},
{
"__id__": 13
"__id__": 14
},
{
"__id__": 19
"__id__": 20
},
{
"__id__": 25
"__id__": 26
},
{
"__id__": 27
"__id__": 28
},
{
"__id__": 110
"__id__": 111
},
{
"__id__": 117
"__id__": 118
},
{
"__id__": 124
"__id__": 125
},
{
"__id__": 131
"__id__": 132
},
{
"__id__": 132
"__id__": 133
}
],
"_active": true,
"_components": [
{
"__id__": 136
},
{
"__id__": 137
},
{
"__id__": 138
},
{
"__id__": 139
}
],
"_prefab": null,
......@@ -533,11 +533,15 @@
"_parent": {
"__id__": 2
},
"_children": [],
"_children": [
{
"__id__": 12
}
],
"_active": true,
"_components": [
{
"__id__": 12
"__id__": 13
}
],
"_prefab": null,
......@@ -552,7 +556,65 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 1280,
"height": 669
"height": 530
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-640,
92,
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": "74nr8PXlVNEqw+wZZWVK3d"
},
{
"__type__": "cc.Node",
"_name": "New Node",
"_objFlags": 0,
"_parent": {
"__id__": 11
},
"_children": [],
"_active": true,
"_components": [],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -564,7 +626,7 @@
"ctor": "Float64Array",
"array": [
0,
25,
0,
0,
0,
0,
......@@ -586,7 +648,7 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "74nr8PXlVNEqw+wZZWVK3d"
"_id": "265ZtJ8sNG7ZuZ0GPDrOKB"
},
{
"__type__": "cc.Widget",
......@@ -601,7 +663,7 @@
"_alignFlags": 41,
"_left": 0,
"_right": 0,
"_top": 0.5000000000000036,
"_top": 3.0000000000000036,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
......@@ -624,16 +686,16 @@
},
"_children": [
{
"__id__": 14
"__id__": 15
}
],
"_active": false,
"_components": [
{
"__id__": 17
"__id__": 18
},
{
"__id__": 18
"__id__": 19
}
],
"_prefab": null,
......@@ -689,16 +751,16 @@
"_name": "Background",
"_objFlags": 512,
"_parent": {
"__id__": 13
"__id__": 14
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 15
"__id__": 16
},
{
"__id__": 16
"__id__": 17
}
],
"_prefab": null,
......@@ -754,7 +816,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 14
"__id__": 15
},
"_enabled": true,
"_materials": [
......@@ -786,7 +848,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 14
"__id__": 15
},
"_enabled": true,
"alignMode": 0,
......@@ -813,7 +875,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 13
"__id__": 14
},
"_enabled": true,
"_normalMaterial": null,
......@@ -886,7 +948,7 @@
"__uuid__": "29158224-f8dd-4661-a796-1ffab537140e"
},
"_N$target": {
"__id__": 14
"__id__": 15
},
"_id": "a7bokJqmFOzr/MISTwOg6i"
},
......@@ -895,7 +957,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 13
"__id__": 14
},
"_enabled": true,
"alignMode": 1,
......@@ -926,16 +988,16 @@
},
"_children": [
{
"__id__": 20
"__id__": 21
}
],
"_active": false,
"_components": [
{
"__id__": 23
"__id__": 24
},
{
"__id__": 24
"__id__": 25
}
],
"_prefab": null,
......@@ -991,16 +1053,16 @@
"_name": "Background",
"_objFlags": 512,
"_parent": {
"__id__": 19
"__id__": 20
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 21
"__id__": 22
},
{
"__id__": 22
"__id__": 23
}
],
"_prefab": null,
......@@ -1056,7 +1118,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 20
"__id__": 21
},
"_enabled": true,
"_materials": [
......@@ -1088,7 +1150,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 20
"__id__": 21
},
"_enabled": true,
"alignMode": 0,
......@@ -1115,7 +1177,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 19
"__id__": 20
},
"_enabled": true,
"_normalMaterial": null,
......@@ -1188,7 +1250,7 @@
"__uuid__": "29158224-f8dd-4661-a796-1ffab537140e"
},
"_N$target": {
"__id__": 20
"__id__": 21
},
"_id": "5eT/n+7rNKcp5dlal/nXdD"
},
......@@ -1197,7 +1259,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 19
"__id__": 20
},
"_enabled": true,
"alignMode": 1,
......@@ -1230,7 +1292,7 @@
"_active": true,
"_components": [
{
"__id__": 26
"__id__": 27
}
],
"_prefab": null,
......@@ -1286,7 +1348,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 25
"__id__": 26
},
"_enabled": true,
"alignMode": 1,
......@@ -1317,16 +1379,16 @@
},
"_children": [
{
"__id__": 28
"__id__": 29
},
{
"__id__": 31
"__id__": 32
}
],
"_active": true,
"_components": [
{
"__id__": 109
"__id__": 110
}
],
"_prefab": null,
......@@ -1382,16 +1444,16 @@
"_name": "fg",
"_objFlags": 0,
"_parent": {
"__id__": 27
"__id__": 28
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 29
"__id__": 30
},
{
"__id__": 30
"__id__": 31
}
],
"_prefab": null,
......@@ -1447,7 +1509,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 28
"__id__": 29
},
"_enabled": true,
"_materials": [
......@@ -1479,7 +1541,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 28
"__id__": 29
},
"_enabled": true,
"alignMode": 1,
......@@ -1506,14 +1568,11 @@
"_name": "kind",
"_objFlags": 0,
"_parent": {
"__id__": 27
"__id__": 28
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 32
},
{
"__id__": 33
},
......@@ -1522,6 +1581,9 @@
},
{
"__id__": 35
},
{
"__id__": 36
}
],
"_prefab": null,
......@@ -1577,7 +1639,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 31
"__id__": 32
},
"_enabled": true,
"_materials": [
......@@ -1607,7 +1669,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 31
"__id__": 32
},
"_enabled": true,
"_layoutSize": {
......@@ -1639,7 +1701,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 31
"__id__": 32
},
"_enabled": true,
"alignMode": 1,
......@@ -1666,14 +1728,14 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 31
"__id__": 32
},
"_enabled": true,
"template_node": {
"__id__": 36
"__id__": 37
},
"layout": {
"__id__": 33
"__id__": 34
},
"_id": "4c0zH+IBpC0ZKkku4vpB8v"
},
......@@ -1682,35 +1744,35 @@
"_name": "kind_item",
"_objFlags": 0,
"_parent": {
"__id__": 37
"__id__": 38
},
"_children": [
{
"__id__": 70
"__id__": 71
},
{
"__id__": 82
"__id__": 83
},
{
"__id__": 88
"__id__": 89
},
{
"__id__": 94
"__id__": 95
},
{
"__id__": 102
"__id__": 103
},
{
"__id__": 104
"__id__": 105
}
],
"_active": true,
"_components": [
{
"__id__": 107
"__id__": 108
},
{
"__id__": 108
"__id__": 109
}
],
"_prefab": null,
......@@ -1770,13 +1832,13 @@
},
"_children": [
{
"__id__": 38
"__id__": 39
},
{
"__id__": 36
"__id__": 37
},
{
"__id__": 55
"__id__": 56
}
],
"_active": true,
......@@ -1834,32 +1896,32 @@
"_name": "audio",
"_objFlags": 0,
"_parent": {
"__id__": 37
"__id__": 38
},
"_children": [
{
"__id__": 39
"__id__": 40
},
{
"__id__": 41
"__id__": 42
},
{
"__id__": 43
"__id__": 44
},
{
"__id__": 45
"__id__": 46
},
{
"__id__": 47
"__id__": 48
},
{
"__id__": 49
"__id__": 50
},
{
"__id__": 51
"__id__": 52
},
{
"__id__": 53
"__id__": 54
}
],
"_active": true,
......@@ -1917,13 +1979,13 @@
"_name": "button",
"_objFlags": 0,
"_parent": {
"__id__": 38
"__id__": 39
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 40
"__id__": 41
}
],
"_prefab": null,
......@@ -1979,7 +2041,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 39
"__id__": 40
},
"_enabled": true,
"_clip": {
......@@ -1998,13 +2060,13 @@
"_name": "complete",
"_objFlags": 0,
"_parent": {
"__id__": 38
"__id__": 39
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 42
"__id__": 43
}
],
"_prefab": null,
......@@ -2060,7 +2122,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 41
"__id__": 42
},
"_enabled": true,
"_clip": {
......@@ -2079,13 +2141,13 @@
"_name": "correct",
"_objFlags": 0,
"_parent": {
"__id__": 38
"__id__": 39
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 44
"__id__": 45
}
],
"_prefab": null,
......@@ -2141,7 +2203,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 43
"__id__": 44
},
"_enabled": true,
"_clip": {
......@@ -2160,13 +2222,13 @@
"_name": "incorrect",
"_objFlags": 0,
"_parent": {
"__id__": 38
"__id__": 39
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 46
"__id__": 47
}
],
"_prefab": null,
......@@ -2222,7 +2284,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 45
"__id__": 46
},
"_enabled": true,
"_clip": {
......@@ -2241,13 +2303,13 @@
"_name": "sahua",
"_objFlags": 0,
"_parent": {
"__id__": 38
"__id__": 39
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 48
"__id__": 49
}
],
"_prefab": null,
......@@ -2303,7 +2365,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 47
"__id__": 48
},
"_enabled": true,
"_clip": {
......@@ -2322,13 +2384,13 @@
"_name": "star",
"_objFlags": 0,
"_parent": {
"__id__": 38
"__id__": 39
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 50
"__id__": 51
}
],
"_prefab": null,
......@@ -2384,7 +2446,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 49
"__id__": 50
},
"_enabled": true,
"_clip": {
......@@ -2403,13 +2465,13 @@
"_name": "tap",
"_objFlags": 0,
"_parent": {
"__id__": 38
"__id__": 39
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 52
"__id__": 53
}
],
"_prefab": null,
......@@ -2465,7 +2527,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 51
"__id__": 52
},
"_enabled": true,
"_clip": {
......@@ -2484,13 +2546,13 @@
"_name": "up",
"_objFlags": 0,
"_parent": {
"__id__": 38
"__id__": 39
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 54
"__id__": 55
}
],
"_prefab": null,
......@@ -2546,7 +2608,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 53
"__id__": 54
},
"_enabled": true,
"_clip": {
......@@ -2565,26 +2627,26 @@
"_name": "option_item",
"_objFlags": 0,
"_parent": {
"__id__": 37
"__id__": 38
},
"_children": [
{
"__id__": 56
"__id__": 57
},
{
"__id__": 58
"__id__": 59
},
{
"__id__": 62
"__id__": 63
},
{
"__id__": 64
"__id__": 65
}
],
"_active": true,
"_components": [
{
"__id__": 69
"__id__": 70
}
],
"_prefab": null,
......@@ -2640,13 +2702,13 @@
"_name": "bg_picture1-finish",
"_objFlags": 0,
"_parent": {
"__id__": 55
"__id__": 56
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 57
"__id__": 58
}
],
"_prefab": null,
......@@ -2702,7 +2764,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 56
"__id__": 57
},
"_enabled": true,
"_materials": [
......@@ -2734,17 +2796,17 @@
"_name": "bg_picture1",
"_objFlags": 0,
"_parent": {
"__id__": 55
"__id__": 56
},
"_children": [
{
"__id__": 59
"__id__": 60
}
],
"_active": true,
"_components": [
{
"__id__": 61
"__id__": 62
}
],
"_prefab": null,
......@@ -2800,13 +2862,13 @@
"_name": "pic",
"_objFlags": 0,
"_parent": {
"__id__": 58
"__id__": 59
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 60
"__id__": 61
}
],
"_prefab": null,
......@@ -2862,7 +2924,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 59
"__id__": 60
},
"_enabled": true,
"_materials": [
......@@ -2894,7 +2956,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 58
"__id__": 59
},
"_enabled": true,
"_materials": [
......@@ -2926,13 +2988,13 @@
"_name": "bg_word1-finish",
"_objFlags": 0,
"_parent": {
"__id__": 55
"__id__": 56
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 63
"__id__": 64
}
],
"_prefab": null,
......@@ -2988,7 +3050,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 62
"__id__": 63
},
"_enabled": true,
"_materials": [
......@@ -3020,17 +3082,17 @@
"_name": "bg_word1",
"_objFlags": 0,
"_parent": {
"__id__": 55
"__id__": 56
},
"_children": [
{
"__id__": 65
"__id__": 66
}
],
"_active": true,
"_components": [
{
"__id__": 68
"__id__": 69
}
],
"_prefab": null,
......@@ -3086,16 +3148,16 @@
"_name": "New Label",
"_objFlags": 0,
"_parent": {
"__id__": 64
"__id__": 65
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 66
"__id__": 67
},
{
"__id__": 67
"__id__": 68
}
],
"_prefab": null,
......@@ -3151,7 +3213,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 65
"__id__": 66
},
"_enabled": true,
"_materials": [
......@@ -3186,7 +3248,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 65
"__id__": 66
},
"_enabled": true,
"alignMode": 1,
......@@ -3213,7 +3275,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 64
"__id__": 65
},
"_enabled": true,
"_materials": [
......@@ -3245,26 +3307,26 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 55
"__id__": 56
},
"_enabled": true,
"pic_node": {
"__id__": 58
"__id__": 59
},
"pic_finish": {
"__id__": 56
"__id__": 57
},
"pic": {
"__id__": 60
"__id__": 61
},
"word_node": {
"__id__": 64
"__id__": 65
},
"word_finish": {
"__id__": 62
"__id__": 63
},
"word": {
"__id__": 66
"__id__": 67
},
"_id": "2ayVCcpXRLmarOKXbwJ/h8"
},
......@@ -3273,32 +3335,32 @@
"_name": "layout_area",
"_objFlags": 0,
"_parent": {
"__id__": 36
"__id__": 37
},
"_children": [
{
"__id__": 71
"__id__": 72
},
{
"__id__": 73
"__id__": 74
},
{
"__id__": 75
"__id__": 76
},
{
"__id__": 77
"__id__": 78
}
],
"_active": true,
"_components": [
{
"__id__": 79
},
{
"__id__": 80
},
{
"__id__": 81
},
{
"__id__": 82
}
],
"_prefab": null,
......@@ -3354,13 +3416,13 @@
"_name": "bg_picture1",
"_objFlags": 0,
"_parent": {
"__id__": 70
"__id__": 71
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 72
"__id__": 73
}
],
"_prefab": null,
......@@ -3416,7 +3478,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 71
"__id__": 72
},
"_enabled": true,
"_materials": [
......@@ -3448,13 +3510,13 @@
"_name": "bg_picture1 copy",
"_objFlags": 0,
"_parent": {
"__id__": 70
"__id__": 71
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 74
"__id__": 75
}
],
"_prefab": null,
......@@ -3510,7 +3572,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 73
"__id__": 74
},
"_enabled": true,
"_materials": [
......@@ -3542,13 +3604,13 @@
"_name": "bg_picture1 copy",
"_objFlags": 0,
"_parent": {
"__id__": 70
"__id__": 71
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 76
"__id__": 77
}
],
"_prefab": null,
......@@ -3604,7 +3666,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 75
"__id__": 76
},
"_enabled": true,
"_materials": [
......@@ -3636,13 +3698,13 @@
"_name": "bg_picture1 copy",
"_objFlags": 0,
"_parent": {
"__id__": 70
"__id__": 71
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 78
"__id__": 79
}
],
"_prefab": null,
......@@ -3698,7 +3760,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 77
"__id__": 78
},
"_enabled": true,
"_materials": [
......@@ -3730,7 +3792,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 70
"__id__": 71
},
"_enabled": true,
"_layoutSize": {
......@@ -3762,7 +3824,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 70
"__id__": 71
},
"_enabled": true,
"alignMode": 1,
......@@ -3789,7 +3851,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 70
"__id__": 71
},
"_enabled": true,
"_materials": [
......@@ -3809,23 +3871,23 @@
"_name": "bg_pic",
"_objFlags": 0,
"_parent": {
"__id__": 36
"__id__": 37
},
"_children": [
{
"__id__": 83
"__id__": 84
}
],
"_active": true,
"_components": [
{
"__id__": 85
},
{
"__id__": 86
},
{
"__id__": 87
},
{
"__id__": 88
}
],
"_prefab": null,
......@@ -3881,13 +3943,13 @@
"_name": "word_pic",
"_objFlags": 0,
"_parent": {
"__id__": 82
"__id__": 83
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 84
"__id__": 85
}
],
"_prefab": null,
......@@ -3943,7 +4005,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 83
"__id__": 84
},
"_enabled": true,
"_materials": [
......@@ -3975,7 +4037,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 82
"__id__": 83
},
"_enabled": true,
"_materials": [
......@@ -4007,7 +4069,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 82
"__id__": 83
},
"_enabled": true,
"_normalMaterial": null,
......@@ -4075,7 +4137,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 82
"__id__": 83
},
"_enabled": true,
"alignMode": 1,
......@@ -4102,23 +4164,23 @@
"_name": "bg_text",
"_objFlags": 0,
"_parent": {
"__id__": 36
"__id__": 37
},
"_children": [
{
"__id__": 89
"__id__": 90
}
],
"_active": true,
"_components": [
{
"__id__": 91
},
{
"__id__": 92
},
{
"__id__": 93
},
{
"__id__": 94
}
],
"_prefab": null,
......@@ -4174,13 +4236,13 @@
"_name": "word_text",
"_objFlags": 0,
"_parent": {
"__id__": 88
"__id__": 89
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 90
"__id__": 91
}
],
"_prefab": null,
......@@ -4236,7 +4298,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 89
"__id__": 90
},
"_enabled": true,
"_materials": [
......@@ -4271,7 +4333,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 88
"__id__": 89
},
"_enabled": true,
"_materials": [
......@@ -4303,7 +4365,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 88
"__id__": 89
},
"_enabled": true,
"_normalMaterial": null,
......@@ -4371,7 +4433,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 88
"__id__": 89
},
"_enabled": true,
"alignMode": 1,
......@@ -4398,20 +4460,20 @@
"_name": "btn_sound",
"_objFlags": 0,
"_parent": {
"__id__": 36
"__id__": 37
},
"_children": [
{
"__id__": 95
"__id__": 96
}
],
"_active": true,
"_components": [
{
"__id__": 100
"__id__": 101
},
{
"__id__": 101
"__id__": 102
}
],
"_prefab": null,
......@@ -4467,20 +4529,20 @@
"_name": "Background",
"_objFlags": 512,
"_parent": {
"__id__": 94
"__id__": 95
},
"_children": [
{
"__id__": 96
"__id__": 97
}
],
"_active": true,
"_components": [
{
"__id__": 98
"__id__": 99
},
{
"__id__": 99
"__id__": 100
}
],
"_prefab": null,
......@@ -4536,13 +4598,13 @@
"_name": "Label",
"_objFlags": 512,
"_parent": {
"__id__": 95
"__id__": 96
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 97
"__id__": 98
}
],
"_prefab": null,
......@@ -4598,7 +4660,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 96
"__id__": 97
},
"_enabled": true,
"_materials": [
......@@ -4631,7 +4693,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 95
"__id__": 96
},
"_enabled": true,
"_materials": [
......@@ -4663,7 +4725,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 95
"__id__": 96
},
"_enabled": true,
"alignMode": 0,
......@@ -4690,7 +4752,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 94
"__id__": 95
},
"_enabled": true,
"_normalMaterial": null,
......@@ -4763,7 +4825,7 @@
"__uuid__": "29158224-f8dd-4661-a796-1ffab537140e"
},
"_N$target": {
"__id__": 95
"__id__": 96
},
"_id": "e0mhGmRlRMfLPZO0bKDTQn"
},
......@@ -4772,7 +4834,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 94
"__id__": 95
},
"_enabled": true,
"alignMode": 1,
......@@ -4799,13 +4861,13 @@
"_name": "show_node",
"_objFlags": 0,
"_parent": {
"__id__": 36
"__id__": 37
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 103
"__id__": 104
}
],
"_prefab": null,
......@@ -4861,7 +4923,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 102
"__id__": 103
},
"_enabled": true,
"alignMode": 1,
......@@ -4888,16 +4950,16 @@
"_name": "db_correct",
"_objFlags": 0,
"_parent": {
"__id__": 36
"__id__": 37
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 105
"__id__": 106
},
{
"__id__": 106
"__id__": 107
}
],
"_prefab": null,
......@@ -4953,7 +5015,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 104
"__id__": 105
},
"_enabled": true,
"_materials": [
......@@ -4993,7 +5055,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 104
"__id__": 105
},
"_enabled": true,
"alignMode": 1,
......@@ -5020,7 +5082,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 36
"__id__": 37
},
"_enabled": true,
"_materials": [
......@@ -5052,26 +5114,26 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 36
"__id__": 37
},
"_enabled": true,
"layout": {
"__id__": 79
"__id__": 80
},
"btn_sound": {
"__id__": 100
"__id__": 101
},
"tips_text_bg": {
"__id__": 88
"__id__": 89
},
"tips_pic_bg": {
"__id__": 82
"__id__": 83
},
"show_node": {
"__id__": 102
"__id__": 103
},
"animate_node": {
"__id__": 104
"__id__": 105
},
"_id": "c9qKhRAYhDn4CMZDd11frs"
},
......@@ -5080,7 +5142,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 27
"__id__": 28
},
"_enabled": true,
"alignMode": 1,
......@@ -5111,13 +5173,13 @@
},
"_children": [
{
"__id__": 111
"__id__": 112
}
],
"_active": true,
"_components": [
{
"__id__": 116
"__id__": 117
}
],
"_prefab": null,
......@@ -5173,20 +5235,20 @@
"_name": "Background",
"_objFlags": 512,
"_parent": {
"__id__": 110
"__id__": 111
},
"_children": [
{
"__id__": 112
"__id__": 113
}
],
"_active": true,
"_components": [
{
"__id__": 114
"__id__": 115
},
{
"__id__": 115
"__id__": 116
}
],
"_prefab": null,
......@@ -5242,13 +5304,13 @@
"_name": "Label",
"_objFlags": 512,
"_parent": {
"__id__": 111
"__id__": 112
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 113
"__id__": 114
}
],
"_prefab": null,
......@@ -5304,7 +5366,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 112
"__id__": 113
},
"_enabled": true,
"_materials": [
......@@ -5337,7 +5399,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 111
"__id__": 112
},
"_enabled": true,
"_materials": [
......@@ -5369,7 +5431,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 111
"__id__": 112
},
"_enabled": true,
"alignMode": 0,
......@@ -5396,7 +5458,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 110
"__id__": 111
},
"_enabled": true,
"_normalMaterial": null,
......@@ -5469,7 +5531,7 @@
"__uuid__": "29158224-f8dd-4661-a796-1ffab537140e"
},
"_N$target": {
"__id__": 111
"__id__": 112
},
"_id": "08X/7fPaZJsYxODfLTQ3pD"
},
......@@ -5482,13 +5544,13 @@
},
"_children": [
{
"__id__": 118
"__id__": 119
}
],
"_active": true,
"_components": [
{
"__id__": 123
"__id__": 124
}
],
"_prefab": null,
......@@ -5544,20 +5606,20 @@
"_name": "Background",
"_objFlags": 512,
"_parent": {
"__id__": 117
"__id__": 118
},
"_children": [
{
"__id__": 119
"__id__": 120
}
],
"_active": true,
"_components": [
{
"__id__": 121
"__id__": 122
},
{
"__id__": 122
"__id__": 123
}
],
"_prefab": null,
......@@ -5613,13 +5675,13 @@
"_name": "Label",
"_objFlags": 512,
"_parent": {
"__id__": 118
"__id__": 119
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 120
"__id__": 121
}
],
"_prefab": null,
......@@ -5675,7 +5737,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 119
"__id__": 120
},
"_enabled": true,
"_materials": [
......@@ -5708,7 +5770,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 118
"__id__": 119
},
"_enabled": true,
"_materials": [
......@@ -5740,7 +5802,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 118
"__id__": 119
},
"_enabled": true,
"alignMode": 0,
......@@ -5767,7 +5829,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 117
"__id__": 118
},
"_enabled": true,
"_normalMaterial": null,
......@@ -5840,7 +5902,7 @@
"__uuid__": "29158224-f8dd-4661-a796-1ffab537140e"
},
"_N$target": {
"__id__": 118
"__id__": 119
},
"_id": "c9YYFUeMZEJIDtnNx+WYUc"
},
......@@ -5853,13 +5915,13 @@
},
"_children": [
{
"__id__": 125
"__id__": 126
}
],
"_active": true,
"_components": [
{
"__id__": 130
"__id__": 131
}
],
"_prefab": null,
......@@ -5915,20 +5977,20 @@
"_name": "Background",
"_objFlags": 512,
"_parent": {
"__id__": 124
"__id__": 125
},
"_children": [
{
"__id__": 126
"__id__": 127
}
],
"_active": true,
"_components": [
{
"__id__": 128
"__id__": 129
},
{
"__id__": 129
"__id__": 130
}
],
"_prefab": null,
......@@ -5984,13 +6046,13 @@
"_name": "Label",
"_objFlags": 512,
"_parent": {
"__id__": 125
"__id__": 126
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 127
"__id__": 128
}
],
"_prefab": null,
......@@ -6046,7 +6108,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 126
"__id__": 127
},
"_enabled": true,
"_materials": [
......@@ -6079,7 +6141,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 125
"__id__": 126
},
"_enabled": true,
"_materials": [
......@@ -6111,7 +6173,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 125
"__id__": 126
},
"_enabled": true,
"alignMode": 0,
......@@ -6138,7 +6200,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 124
"__id__": 125
},
"_enabled": true,
"_normalMaterial": null,
......@@ -6211,7 +6273,7 @@
"__uuid__": "29158224-f8dd-4661-a796-1ffab537140e"
},
"_N$target": {
"__id__": 125
"__id__": 126
},
"_id": "49NDPbH/xBe5OuIIfr1l+x"
},
......@@ -6283,14 +6345,14 @@
"_children": [],
"_active": true,
"_components": [
{
"__id__": 133
},
{
"__id__": 134
},
{
"__id__": 135
},
{
"__id__": 136
}
],
"_prefab": null,
......@@ -6346,7 +6408,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 132
"__id__": 133
},
"_enabled": true,
"_materials": [
......@@ -6376,7 +6438,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 132
"__id__": 133
},
"_enabled": true,
"_layoutSize": {
......@@ -6408,7 +6470,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 132
"__id__": 133
},
"_enabled": true,
"alignMode": 1,
......@@ -6493,22 +6555,22 @@
},
"_children": [
{
"__id__": 140
"__id__": 141
},
{
"__id__": 142
"__id__": 143
},
{
"__id__": 144
"__id__": 145
},
{
"__id__": 146
"__id__": 147
},
{
"__id__": 148
"__id__": 149
},
{
"__id__": 150
"__id__": 151
}
],
"_active": true,
......@@ -6566,13 +6628,13 @@
"_name": "bg_sahua",
"_objFlags": 0,
"_parent": {
"__id__": 139
"__id__": 140
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 141
"__id__": 142
}
],
"_prefab": null,
......@@ -6628,7 +6690,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 140
"__id__": 141
},
"_enabled": true,
"_materials": [
......@@ -6660,13 +6722,13 @@
"_name": "bg_sahua",
"_objFlags": 0,
"_parent": {
"__id__": 139
"__id__": 140
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 143
"__id__": 144
}
],
"_prefab": null,
......@@ -6722,7 +6784,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 142
"__id__": 143
},
"_enabled": true,
"_materials": [
......@@ -6754,13 +6816,13 @@
"_name": "bg_sahua",
"_objFlags": 0,
"_parent": {
"__id__": 139
"__id__": 140
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 145
"__id__": 146
}
],
"_prefab": null,
......@@ -6816,7 +6878,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 144
"__id__": 145
},
"_enabled": true,
"_materials": [
......@@ -6848,13 +6910,13 @@
"_name": "bg_sahua",
"_objFlags": 0,
"_parent": {
"__id__": 139
"__id__": 140
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 147
"__id__": 148
}
],
"_prefab": null,
......@@ -6910,7 +6972,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 146
"__id__": 147
},
"_enabled": true,
"_materials": [
......@@ -6942,13 +7004,13 @@
"_name": "bg_sahua",
"_objFlags": 0,
"_parent": {
"__id__": 139
"__id__": 140
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 149
"__id__": 150
}
],
"_prefab": null,
......@@ -7004,7 +7066,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 148
"__id__": 149
},
"_enabled": true,
"_materials": [
......@@ -7036,13 +7098,13 @@
"_name": "bg_sahua",
"_objFlags": 0,
"_parent": {
"__id__": 139
"__id__": 140
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 151
"__id__": 152
}
],
"_prefab": null,
......@@ -7098,7 +7160,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 150
"__id__": 151
},
"_enabled": true,
"_materials": [
......@@ -7134,13 +7196,13 @@
},
"_children": [
{
"__id__": 153
"__id__": 154
}
],
"_active": true,
"_components": [
{
"__id__": 157
"__id__": 158
}
],
"_prefab": null,
......@@ -7196,17 +7258,17 @@
"_name": "Star",
"_objFlags": 0,
"_parent": {
"__id__": 152
"__id__": 153
},
"_children": [
{
"__id__": 154
"__id__": 155
}
],
"_active": false,
"_components": [
{
"__id__": 156
"__id__": 157
}
],
"_prefab": null,
......@@ -7262,13 +7324,13 @@
"_name": "StarBig",
"_objFlags": 0,
"_parent": {
"__id__": 153
"__id__": 154
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 155
"__id__": 156
}
],
"_prefab": null,
......@@ -7324,7 +7386,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 154
"__id__": 155
},
"_enabled": true,
"_materials": [],
......@@ -7352,7 +7414,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 153
"__id__": 154
},
"_enabled": true,
"_materials": [
......@@ -7384,7 +7446,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 152
"__id__": 153
},
"_enabled": true,
"_materials": [
......@@ -7420,22 +7482,22 @@
},
"_children": [
{
"__id__": 159
"__id__": 160
},
{
"__id__": 161
"__id__": 162
},
{
"__id__": 165
"__id__": 166
},
{
"__id__": 167
"__id__": 168
}
],
"_active": true,
"_components": [
{
"__id__": 172
"__id__": 173
}
],
"_prefab": null,
......@@ -7491,13 +7553,13 @@
"_name": "bg_picture1-finish",
"_objFlags": 0,
"_parent": {
"__id__": 158
"__id__": 159
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 160
"__id__": 161
}
],
"_prefab": null,
......@@ -7553,7 +7615,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 159
"__id__": 160
},
"_enabled": true,
"_materials": [
......@@ -7585,17 +7647,17 @@
"_name": "bg_picture1",
"_objFlags": 0,
"_parent": {
"__id__": 158
"__id__": 159
},
"_children": [
{
"__id__": 162
"__id__": 163
}
],
"_active": true,
"_components": [
{
"__id__": 164
"__id__": 165
}
],
"_prefab": null,
......@@ -7651,13 +7713,13 @@
"_name": "pic",
"_objFlags": 0,
"_parent": {
"__id__": 161
"__id__": 162
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 163
"__id__": 164
}
],
"_prefab": null,
......@@ -7713,7 +7775,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 162
"__id__": 163
},
"_enabled": true,
"_materials": [
......@@ -7745,7 +7807,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 161
"__id__": 162
},
"_enabled": true,
"_materials": [
......@@ -7777,13 +7839,13 @@
"_name": "bg_word1-finish",
"_objFlags": 0,
"_parent": {
"__id__": 158
"__id__": 159
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 166
"__id__": 167
}
],
"_prefab": null,
......@@ -7839,7 +7901,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 165
"__id__": 166
},
"_enabled": true,
"_materials": [
......@@ -7871,17 +7933,17 @@
"_name": "bg_word1",
"_objFlags": 0,
"_parent": {
"__id__": 158
"__id__": 159
},
"_children": [
{
"__id__": 168
"__id__": 169
}
],
"_active": true,
"_components": [
{
"__id__": 171
"__id__": 172
}
],
"_prefab": null,
......@@ -7937,16 +7999,16 @@
"_name": "New Label",
"_objFlags": 0,
"_parent": {
"__id__": 167
"__id__": 168
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 169
"__id__": 170
},
{
"__id__": 170
"__id__": 171
}
],
"_prefab": null,
......@@ -8002,7 +8064,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 168
"__id__": 169
},
"_enabled": true,
"_materials": [
......@@ -8037,7 +8099,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 168
"__id__": 169
},
"_enabled": true,
"alignMode": 1,
......@@ -8064,7 +8126,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 167
"__id__": 168
},
"_enabled": true,
"_materials": [
......@@ -8096,26 +8158,26 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 158
"__id__": 159
},
"_enabled": true,
"pic_node": {
"__id__": 161
"__id__": 162
},
"pic_finish": {
"__id__": 159
"__id__": 160
},
"pic": {
"__id__": 163
"__id__": 164
},
"word_node": {
"__id__": 167
"__id__": 168
},
"word_finish": {
"__id__": 165
"__id__": 166
},
"word": {
"__id__": 169
"__id__": 170
},
"_id": "8dsxiyZ1dGt6uZJDUodj+3"
}
......
......@@ -61,13 +61,65 @@ cc.Class({
getData((data) => {
console.log('data:', data);
//this.data = data || this.getDefaultData();
this.data = this.getDefaultData();
this.data = JSON.parse(JSON.stringify(this.data))
this.data = data || this.getDefaultData();
//this.data = this.getDefaultData();
//this.data = JSON.parse(JSON.stringify(this.data));
this.preData();
this.preloadItem()
})
},
preData(){
let res = JSON.parse(JSON.stringify(this.data));
let data = [];
for(let i = 0; i < res.stars.length; i++){
data[i] = [];
let pages = this.getArrayByID(res.pages, res.stars[i].id, 'star_id');
for(let j = 0; j < pages.length; j++){
data[i][j] = [];
let kinds = this.getArrayByID(res.kinds, pages[j].id, 'page_id');
for(let k = 0; k < kinds.length; k++){
let _kind = {};
data[i][j][k] = _kind;
_kind.text = kinds[k].word||"";
_kind.pic = kinds[k].pic_url||"";
_kind.audio = kinds[k].audio_url||"";
_kind.options = [];
let options = this.getArrayByID(res.options, kinds[k].id, 'kind_id');
for(let m = 0; m < options.length; m++){
let _option = {};
_kind.options[m] = _option;
_option.text = options[m].word||"";
_option.pic = options[m].pic_url||"";
_option.audio = options[m].audio_url||"";
}
}
}
}
this.data = {};
this.data.stars = data;
console.log(data);
},
getArrayByID(ar, id, t){
let ret = [];
for(let i = 0; i < ar.length; i++){
if (ar[i][t] == id)
ret.push(ar[i]);
}
return ret;
},
getIndexInArray(ar, id){
for(let i = 0; i < ar.length; i++){
if (ar[i].id == id){
return i;
}
}
return -1;
},
getData(func) {
if (window && window.courseware) {
window.courseware.getData(func, 'scene');
......@@ -145,6 +197,9 @@ cc.Class({
this._move_area = cc.find('Canvas/move_area');
this._kind_group = cc.find('Canvas/fg/kind').getComponent(cc.js.getClassByName('KindGroup'));
this._move_area.height = this._frameSize.height - 260;
this._ys = [-this._move_area.height/4, this._move_area.height/4];
// let option_node = cc.find('res/option');
// let option = option_node.getComponent(cc.js.getClassByName('WordOption'));
......@@ -234,6 +289,8 @@ cc.Class({
let ot = node.getComponent(cc.js.getClassByName('WordOption'));
ot.copyValues(selected);
ot.selected(true);
//node.width *= 0.4;
//node.height *= 0.4;
kind.showCorrect(node, ()=>{
if (this.tryFinish())
this.pageFinish();
......@@ -521,13 +578,18 @@ cc.Class({
let ot = cc.find('res/option_item');
let item, op;
this._xs = [0, 0];
for(let i = 0; i < os.length; i++){
item = cc.instantiate(ot);
onode.addChild(item);
op = item.getComponent(cc.js.getClassByName('WordOption'));
op.init(os[i]);
item.x = -(this._frameSize.width/2 + (parseInt(i/3) + 1.5)*item.width);
item.y = -20 + (i%3)*150;
console.log(item._w);
this._xs[i%2] -= (i < 2 ? item._w/2 : item._w);
item.x = this._xs[i%2];
console.log(item.x);
item.y = this._ys[i%2];
}
},
......@@ -587,13 +649,17 @@ cc.Class({
if (!this._moved)
return;
let speed = 2;
let area = this._move_area;
this._xs[0] += speed;
this._xs[1] += speed;
for(let i = 0; i < area.childrenCount; i++){
let item = area.children[i];
item.x ++;
item.x += speed;
if (item.x > this._frameSize.width/2 + item.width*1.5){
item.x *= -1;
if (item.x > this._frameSize.width + item._w*1.2){
this._xs[i%2] -= item._w*1.2;
item.x = Math.min(-item._w/2, this._xs[i%2]);
}
}
},
......
export const defaultData = {
"stars":[{"id":"16239922308635wok5p"},{"id":"1623992233278l9trhw"}],"pages":[{"id":"1623992235665ryt80q","star_id":"16239922308635wok5p"},{"id":"1623992246832rwwxwc","star_id":"16239922308635wok5p"},{"id":"162399224768148xblq","star_id":"1623992233278l9trhw"},{"id":"1624169541137z3l0l8","star_id":"1623992233278l9trhw"}],"kinds":[{"id":"1623981972242lokdmj","word":"aaa","page_id":"1623992235665ryt80q"},{"id":"1623988481981dyiqg7","word":"bbb","page_id":"1623992235665ryt80q"},{"id":"162417027477500qwmy","word":"","page_id":"1623992235665ryt80q"},{"id":"1624170275274l1s0xq","word":"ddd","page_id":"1623992246832rwwxwc"},{"id":"16241702766879192s4","word":"eee","page_id":"1623992246832rwwxwc"},{"id":"1624170277020xpdwcp","word":"","page_id":"1623992246832rwwxwc"},{"id":"1624227738503to7kx2","page_id":"162399224768148xblq","word":"fff"},{"id":"1624227738776v99r1v","page_id":"162399224768148xblq","word":"ggg"},{"id":"1624227740414bof8zt","page_id":"162399224768148xblq","word":""},{"id":"1624227741225xhhzbp","page_id":"1624169541137z3l0l8","word":"kkk"},{"id":"162422774153338vuvx","page_id":"1624169541137z3l0l8","word":"lll"},{"id":"1624227741787cdi54f","page_id":"1624169541137z3l0l8","word":""}],"options":[{"kind_id":"1623981972242lokdmj","word":"a1"},{"kind_id":"1623981972242lokdmj","word":"a2"},{"kind_id":"1623981972242lokdmj","word":"a3"},{"kind_id":"1623988481981dyiqg7","word":"b1"},{"kind_id":"1623988481981dyiqg7","word":"b2"},{"kind_id":"1623988481981dyiqg7","word":"b3"},{"kind_id":"162417027477500qwmy","word":"fff"},{"kind_id":"162417027477500qwmy","word":"rrr"},{"kind_id":"1624170275274l1s0xq","word":"d1"},{"kind_id":"1624170275274l1s0xq","word":"d2"},{"kind_id":"1624170275274l1s0xq","word":"d3"},{"kind_id":"16241702766879192s4","word":"e1"},{"kind_id":"16241702766879192s4","word":"e2"},{"kind_id":"16241702766879192s4","word":"e3"},{"kind_id":"1624170277020xpdwcp","word":"we"},{"kind_id":"1624170277020xpdwcp","word":"eewr"},{"kind_id":"1624227738503to7kx2","word":"f1"},{"kind_id":"1624227738503to7kx2","word":"f2"},{"kind_id":"1624227738503to7kx2","word":"f3"},{"kind_id":"1624227738776v99r1v","word":"g1"},{"kind_id":"1624227738776v99r1v","word":"g2"},{"kind_id":"1624227738776v99r1v","word":"g3"},{"kind_id":"1624227740414bof8zt","word":"3434"},{"kind_id":"1624227740414bof8zt","word":"444"},{"kind_id":"1624227741225xhhzbp","word":"k1"},{"kind_id":"1624227741225xhhzbp","word":"k2"},{"kind_id":"162422774153338vuvx","word":"l1"},{"kind_id":"162422774153338vuvx","word":"l2"},{"kind_id":"1624227741787cdi54f","word":"erg3"},{"kind_id":"1624227741787cdi54f","word":"g34t"}]
}
export const defaultData1= {
stars:[
[
[
......
......@@ -112,6 +112,9 @@ cc.Class({
option.pic.height = item.pic.height;
this.layout.node.addChild(node);
option.adjustPicSize();
option.finished();
node.width/=3;
node.height/=3;
node.opacity = 0;
cc.tween(node)
.to(0.5, {opacity:255})
......
......@@ -49,9 +49,12 @@ cc.Class({
initType(type){
this._type = type;
this.pic_node.active = type == 0;
this.pic.node.active = type == 0;
this.pic_finish.active = false;
this.word_node.active = type == 1;
this.word.node.active = type == 1;
this.word_finish.active = false;
this.node._w = [340, 410][type];
this.resetWH();
},
......@@ -61,10 +64,14 @@ cc.Class({
this.node.height = this.pic_finish.height;
this.pic.node.x = -this.pic_node.x;
this.pic.node.y = -this.pic_node.y;
this.node.width = this.pic_node.width;
this.node.height = this.pic_node.height;
}
else if (this._type == 1){
this.node.width = this.word_finish.width;
this.node.height = this.word_finish.height;
this.node.width = this.word_node.width;
this.node.height = this.word_node.height;
// this.word.node.x = -this.word_node.x;
// this.word.node.y = -this.word_node.y;
}
......@@ -99,6 +106,7 @@ cc.Class({
this.setWord(o.word.string);
this.kind_id = o.kind_id;
this.node._w = o.node._w;
},
adjustPicSize(){
......@@ -106,6 +114,17 @@ cc.Class({
this.pic.node.width = this.pic.width;
this.pic.node.height = this.pic.height;
}
},
finished(){
if (this._type == 0){
this.pic_node.getComponent(cc.Sprite).enabled = false;
this.pic_finish.active = true;
}
else{
this.word_node.getComponent(cc.Sprite).enabled = false;
this.word_finish.active = true;
}
}
......
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