Commit f8495214 authored by wangxin's avatar wangxin

beta 1

parent 3f6c5725
No preview for this file type
......@@ -128,5 +128,8 @@
}
}
},
"defaultProject": "ng-template-generator"
}
"defaultProject": "ng-template-generator",
"cli": {
"analytics": "b31faf27-e43a-4540-93ed-be390c382046"
}
}
\ No newline at end of file
<div class="model-content">
<div style="padding: 10px;">
<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>
<div style="padding: 10px">
<div style="width: 300px; margin-top: 15px">
<span>请输入标题: </span>
<input type="text" nz-input [(ngModel)]="item.title" (blur)="save()" />
</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 style="margin-top: 5px">
<span>标题音频: </span>
<app-audio-recorder
[audioUrl]="item.audio_title"
(audioUploaded)="onAudioUploadSuccess($event, 'audio_title')"
></app-audio-recorder>
</div>
<div style="width: 300px; margin-top: 15px;">
<span>文本: </span>
<input type="text" nz-input [(ngModel)]="item.text" (blur)="save()">
<div style="width: 300px; margin-top: 35px">
<span>请输入问题: </span>
<input type="text" nz-input [(ngModel)]="item.question" (blur)="save()" />
</div>
<div style="margin-top: 5px">
<span>音频: </span>
<span>问题音频: </span>
<app-audio-recorder
[audioUrl]="item.audio_url"
(audioUploaded)="onAudioUploadSuccess($event, 'audio_url')"
[audioUrl]="item.audio_question"
(audioUploaded)="onAudioUploadSuccess($event, 'audio_question')"
></app-audio-recorder>
</div>
</div>
<nz-radio-group
[(ngModel)]="answer"
name="radioValue"
id="radioValue"
(ngModelChange)="onSetAnswer()"
style="width: 80%"
>
<div *ngFor="let it of picArr; let i = index" style="padding: 0.5vw">
<div class="border" style="display: flex; align-items: center">
<div class="item-box" style="width: 30%">
<h5 style="padding-bottom: 1vw">选项-{{ i + 1 }}</h5>
<span style="padding-right: 10px"> 文字内容:</span>
<input type="text" nz-input [(ngModel)]="it.text" (blur)="save()" />
<br />
<br />
<div style="display: flex; align-items: center">
<span style="padding-right: 10px"> 图片:</span>
</div>
<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"
>
<button
style="margin-left: 10px"
nz-button
nzType="danger"
(click)="deleteItem(it)"
>
<span>删除</span>
</button>
</div>
</div>
<!--中间部分-->
<div style="width: 30%; margin-left: 5%; padding: 1vw">
<div
style="display: flex; align-items: center; margin-bottom: 0.5vw"
>
<span style="width: 50px"> 音频: </span>
</div>
<app-audio-recorder
[audioUrl]="it.audio_url"
(audioUploaded)="onAudioUploadSuccessByItem($event, it)"
>
</app-audio-recorder>
</div>
<!-- 左边部分 -->
<div style="width: 30%; margin-left: 5%; padding: 1vw">
<div
style="display: flex; align-items: center; margin-bottom: 0.5vw"
>
<span style="width: 150px"> 设置为正确选项</span>
<label nz-radio [nzValue]="i" (blur)="save()"></label>
</div>
</div>
</div>
</div>
<div nz-col nzSpan="8" class="add-btn-box" style="margin-top: 20px">
<button
style="margin: auto; width: 60%; height: 60%"
nz-button
nzType="dashed"
class="add-btn"
(click)="addPic()"
>
<em nz-icon nzType="plus-circle" nzTheme="outline"></em>
添加选项
</button>
</div>
</nz-radio-group>
</div>
</div>
import { Component, EventEmitter, Input, OnDestroy, OnChanges, OnInit, Output, ApplicationRef, ChangeDetectorRef } from '@angular/core';
import { JsonPipe } from '@angular/common';
import {
Component,
EventEmitter,
Input,
OnDestroy,
OnChanges,
OnInit,
Output,
ApplicationRef,
ChangeDetectorRef,
} from "@angular/core";
import { JsonPipe } from "@angular/common";
@Component({
selector: 'app-form',
templateUrl: './form.component.html',
styleUrls: ['./form.component.css']
selector: "app-form",
templateUrl: "./form.component.html",
styleUrls: ["./form.component.css"],
})
export class FormComponent implements OnInit, OnChanges, OnDestroy {
// 储存数据用
saveKey = "test_001";
saveKey = "andy_et06";
// 储存对象
item;
picArr = [];
answer;
constructor(private appRef: ApplicationRef, private changeDetectorRef: ChangeDetectorRef) {
}
constructor(
private appRef: ApplicationRef,
private changeDetectorRef: ChangeDetectorRef
) {}
createShell() {
this.item.wordList.push({
word: '',
audio: '',
backWord: '',
backWordAudio: '',
word: "",
audio: "",
backWord: "",
backWordAudio: "",
});
this.save();
}
......@@ -34,12 +45,11 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
}
ngOnInit() {
this.item = {};
this.answer = 0;
// 获取存储的数据
(<any>window).courseware.getData((data) => {
if (data) {
this.item = data;
}
......@@ -48,27 +58,28 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
this.changeDetectorRef.markForCheck();
this.changeDetectorRef.detectChanges();
this.refresh();
}, this.saveKey);
}
ngOnChanges() {
}
ngOnChanges() {}
ngOnDestroy() {
}
ngOnDestroy() {}
init() {
if (this.item.options) {
console.log("picarr " + this.picArr);
this.picArr = this.item.options;
}
if (this.item.answer) {
this.answer = this.item.answer;
}
}
/**
* 储存图片数据
* @param e
*/
onImageUploadSuccess(e, key) {
this.item[key] = e.url;
this.save();
}
......@@ -87,19 +98,69 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
this.save();
}
onImageUploadSuccessByItem(e, item, id = null) {
if (id != null) {
item["pic_url_" + id] = e.url;
console.log("upload pic 1" + e.url);
} else {
item.pic_url = e.url;
console.log("upload pic 2" + e.url);
}
this.save();
console.log("this.item: ", this.picArr);
}
onAudioUploadSuccessByItem(e, item, id = null) {
if (id != null) {
item["audio_url_" + id] = e.url;
} else {
item.audio_url = e.url;
}
this.save();
}
onSetAnswer() {
this.save();
}
onBackWordAudioUploadSuccess(e, idx) {
this.item.wordList[idx].backWordAudio = e.url;
this.save();
}
deleteItem(data) {
const index = this.picArr.indexOf(data);
if (index !== -1) {
this.picArr.splice(index, 1);
}
this.save();
}
addPic() {
const data = {
pic_url: "",
audio_url: "",
text: "",
};
this.picArr.push(data);
this.save();
}
/**
* 储存数据
*/
save() {
this.item.answer = this.answer;
this.item.options = this.picArr;
(<any>window).courseware.setData(this.item, null, this.saveKey);
this.refresh();
console.log('this.item = ' + JSON.stringify(this.item));
console.log("this.item = " + JSON.stringify(this.item));
}
/**
......@@ -110,5 +171,4 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
this.appRef.tick();
}, 1);
}
}
\ No newline at end of file
}
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"ver": "2.0.1",
"uuid": "f0680ae0-c079-45ef-abd7-9e63d90b982b",
"uuid": "82894da6-cdf9-4aa2-be54-0d5f3b8c4ff6",
"downloadMode": 0,
"duration": 0.130612,
"duration": 1.854694,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "8ea4585c-d8c0-4de1-96b6-64373d5783f5",
"downloadMode": 0,
"duration": 2.324917,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "527638c3-faf2-4a3e-9fa4-d5b9bfe38876",
"downloadMode": 0,
"duration": 0.556563,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.1.0",
"uuid": "2ce69722-dd5c-4c59-8aab-030f9274292f",
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.1.0",
"uuid": "fcbe8002-5ede-48bd-b86c-b99cd5205db6",
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "6e025b8d-882f-40cb-9001-aaa38dd2d067",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>angle</key>
<real>17</real>
<key>angleVariance</key>
<real>180</real>
<key>blendFuncDestination</key>
<integer>1</integer>
<key>blendFuncSource</key>
<integer>768</integer>
<key>duration</key>
<real>0.22</real>
<key>emitterType</key>
<real>0</real>
<key>finishColorAlpha</key>
<real>1</real>
<key>finishColorBlue</key>
<real>0</real>
<key>finishColorGreen</key>
<real>0</real>
<key>finishColorRed</key>
<real>0</real>
<key>finishColorVarianceAlpha</key>
<real>0</real>
<key>finishColorVarianceBlue</key>
<real>0</real>
<key>finishColorVarianceGreen</key>
<real>0</real>
<key>finishColorVarianceRed</key>
<real>0</real>
<key>finishParticleSize</key>
<real>-1</real>
<key>finishParticleSizeVariance</key>
<real>0</real>
<key>gravityx</key>
<real>-20</real>
<key>gravityy</key>
<real>420</real>
<key>maxParticles</key>
<real>191</real>
<key>maxRadius</key>
<real>0</real>
<key>maxRadiusVariance</key>
<real>0</real>
<key>minRadius</key>
<real>0</real>
<key>particleLifespan</key>
<real>0.47</real>
<key>particleLifespanVariance</key>
<real>0</real>
<key>radialAccelVariance</key>
<real>0</real>
<key>radialAcceleration</key>
<real>0</real>
<key>rotatePerSecond</key>
<real>0</real>
<key>rotatePerSecondVariance</key>
<real>0</real>
<key>rotationEnd</key>
<real>0</real>
<key>rotationEndVariance</key>
<real>0.0</real>
<key>rotationStart</key>
<real>0</real>
<key>rotationStartVariance</key>
<real>0</real>
<key>sourcePositionVariancex</key>
<real>0</real>
<key>sourcePositionVariancey</key>
<real>0</real>
<key>sourcePositionx</key>
<real>416</real>
<key>sourcePositiony</key>
<real>774</real>
<key>speed</key>
<real>480</real>
<key>speedVariance</key>
<real>20</real>
<key>startColorAlpha</key>
<real>0.89</real>
<key>startColorBlue</key>
<real>0.2</real>
<key>startColorGreen</key>
<real>0.4</real>
<key>startColorRed</key>
<real>1</real>
<key>startColorVarianceAlpha</key>
<real>0</real>
<key>startColorVarianceBlue</key>
<real>0</real>
<key>startColorVarianceGreen</key>
<real>0</real>
<key>startColorVarianceRed</key>
<real>0</real>
<key>startParticleSize</key>
<real>20</real>
<key>startParticleSizeVariance</key>
<real>41</real>
<key>tangentialAccelVariance</key>
<real>0</real>
<key>tangentialAcceleration</key>
<real>-700</real>
<key>textureFileName</key>
<string>particle_star.png</string>
<key>textureImageData</key>
<string></string>
</dict>
</plist>
{
"ver": "2.0.1",
"uuid": "fed3a7de-bed5-46e5-8d20-10530d6aea5c",
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "efa5fa09-a4dd-4bfc-ab7e-17c19f85408f",
"uuid": "94f49649-eee2-4783-b25f-00329c370918",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 366,
"height": 336,
"width": 37,
"height": 36,
"platformSettings": {},
"subMetas": {
"1orange": {
"particle_star": {
"ver": "1.0.4",
"uuid": "43d1e79d-6de8-4dcb-b8ce-d767df7913aa",
"rawTextureUuid": "efa5fa09-a4dd-4bfc-ab7e-17c19f85408f",
"uuid": "f530b049-279c-4f38-bf14-7921d575ef52",
"rawTextureUuid": "94f49649-eee2-4783-b25f-00329c370918",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": -0.5,
"offsetY": 0,
"trimX": 0,
"trimY": 1,
"width": 366,
"height": 335,
"rawWidth": 366,
"rawHeight": 336,
"trimY": 0,
"width": 37,
"height": 36,
"rawWidth": 37,
"rawHeight": 36,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
......
{
"ver": "1.1.2",
"uuid": "ca27cc4e-5c3a-47d2-abac-c7adf92260b5",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
[
{
"__type__": "cc.Prefab",
"_name": "",
"_objFlags": 0,
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"asyncLoadAssets": false,
"readonly": false
},
{
"__type__": "cc.Node",
"_name": "op_1",
"_objFlags": 0,
"_parent": null,
"_children": [
{
"__id__": 2
},
{
"__id__": 6
},
{
"__id__": 10
},
{
"__id__": 13
},
{
"__id__": 19
},
{
"__id__": 23
}
],
"_active": true,
"_components": [
{
"__id__": 26
},
{
"__id__": 27
}
],
"_prefab": {
"__id__": 28
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 293,
"height": 352
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-193.5,
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": ""
},
{
"__type__": "cc.Node",
"_name": "title",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 3
},
{
"__id__": 4
}
],
"_prefab": {
"__id__": 5
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 80,
"g": 123,
"b": 214,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 422,
"height": 94
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 1
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
125,
0,
0,
0,
0,
1,
0.5,
0.5,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": ""
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_useOriginalSize": false,
"_string": "",
"_N$string": "",
"_fontSize": 50,
"_lineHeight": 52,
"_enableWrapText": true,
"_N$file": {
"__uuid__": "2ce69722-dd5c-4c59-8aab-030f9274292f"
},
"_isSystemFontUsed": false,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 0,
"_underlineHeight": 0,
"_N$horizontalAlign": 0,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 2,
"_N$cacheMode": 0,
"_id": ""
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 1,
"_left": 0,
"_right": 0,
"_top": 51,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "46d02514-75e2-4973-9a0b-bc662330bfb3"
},
"fileId": "8b6/UxNGhOU4ZJpgHV0qY1",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "btn_sound",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 7
}
],
"_prefab": {
"__id__": 9
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 80,
"g": 123,
"b": 214,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 293,
"height": 115
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
61,
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": ""
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 6
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [
{
"__id__": 8
}
],
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$transition": 0,
"transition": 0,
"_N$normalColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"_N$hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$disabledColor": {
"__type__": "cc.Color",
"r": 124,
"g": 124,
"b": 124,
"a": 255
},
"_N$normalSprite": null,
"_N$pressedSprite": null,
"pressedSprite": null,
"_N$hoverSprite": null,
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": null,
"_id": ""
},
{
"__type__": "cc.ClickEvent",
"target": {
"__id__": 1
},
"component": "",
"_componentId": "0e35cajgN9JJprFb5rvfFSO",
"handler": "clickTitle",
"customEventData": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "46d02514-75e2-4973-9a0b-bc662330bfb3"
},
"fileId": "526hmI25JKgq8XYywPR25c",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "1-6@3x_select",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 11
}
],
"_prefab": {
"__id__": 12
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 254,
"height": 191
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
-62,
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": ""
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 10
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 1,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "8676e03d-253c-47db-aee9-45e71a343f66"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "46d02514-75e2-4973-9a0b-bc662330bfb3"
},
"fileId": "fbthVQN9JHirWz+G0IHczt",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "pic_mask",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [
{
"__id__": 14
}
],
"_active": true,
"_components": [
{
"__id__": 17
}
],
"_prefab": {
"__id__": 18
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 246,
"height": 180
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
1,
-62,
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": ""
},
{
"__type__": "cc.Node",
"_name": "sprite",
"_objFlags": 0,
"_parent": {
"__id__": 13
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 15
}
],
"_prefab": {
"__id__": 16
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 244,
"height": 180
},
"_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": ""
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 14
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": null,
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "46d02514-75e2-4973-9a0b-bc662330bfb3"
},
"fileId": "38s76GIMhHkarIKSGXCO4M",
"sync": false
},
{
"__type__": "cc.Mask",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 13
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_spriteFrame": {
"__uuid__": "2359cab7-72d3-46cd-bc33-a37eb03a072a"
},
"_type": 2,
"_segments": 64,
"_N$alphaThreshold": 0.6,
"_N$inverted": false,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "46d02514-75e2-4973-9a0b-bc662330bfb3"
},
"fileId": "85x25E+ZJFA5JKv+sxCbx4",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "btn_click",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 20
}
],
"_prefab": {
"__id__": 22
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 80,
"g": 123,
"b": 214,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 293,
"height": 218
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 1
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
42.375,
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": ""
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 19
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [
{
"__id__": 21
}
],
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$transition": 0,
"transition": 0,
"_N$normalColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"_N$hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$disabledColor": {
"__type__": "cc.Color",
"r": 124,
"g": 124,
"b": 124,
"a": 255
},
"_N$normalSprite": null,
"_N$pressedSprite": null,
"pressedSprite": null,
"_N$hoverSprite": null,
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": null,
"_id": ""
},
{
"__type__": "cc.ClickEvent",
"target": {
"__id__": 1
},
"component": "",
"_componentId": "0e35cajgN9JJprFb5rvfFSO",
"handler": "clickPic",
"customEventData": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "46d02514-75e2-4973-9a0b-bc662330bfb3"
},
"fileId": "8f2PM/baZEO5lZZmIVPV5K",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "particle_star",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 24
}
],
"_prefab": {
"__id__": 25
},
"_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",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
-62,
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": ""
},
{
"__type__": "cc.ParticleSystem",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 23
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_custom": true,
"_file": {
"__uuid__": "fed3a7de-bed5-46e5-8d20-10530d6aea5c"
},
"_spriteFrame": {
"__uuid__": "f530b049-279c-4f38-bf14-7921d575ef52"
},
"_texture": null,
"_stopped": true,
"playOnLoad": true,
"autoRemoveOnFinish": false,
"totalParticles": 191,
"duration": 0.22,
"emissionRate": 100,
"life": 0.47,
"lifeVar": 0,
"_startColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_startColorVar": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_endColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_endColorVar": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"angle": 17,
"angleVar": 180,
"startSize": 20,
"startSizeVar": 41,
"endSize": -1,
"endSizeVar": 0,
"startSpin": 0,
"startSpinVar": 0,
"endSpin": 0,
"endSpinVar": 0,
"sourcePos": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"posVar": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_positionType": 1,
"positionType": 1,
"emitterMode": 0,
"gravity": {
"__type__": "cc.Vec2",
"x": -20,
"y": 420
},
"speed": 280,
"speedVar": 20,
"tangentialAccel": -700,
"tangentialAccelVar": 0,
"radialAccel": 0,
"radialAccelVar": 0,
"rotationIsDir": false,
"startRadius": 0,
"startRadiusVar": 0,
"endRadius": 0,
"endRadiusVar": 0,
"rotatePerS": 0,
"rotatePerSVar": 0,
"_N$preview": true,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "46d02514-75e2-4973-9a0b-bc662330bfb3"
},
"fileId": "24JopjZG5BJ5D4I5+tuWmu",
"sync": false
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "60ac123b-e869-476d-a732-a38e518d7122"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": ""
},
{
"__type__": "0e35cajgN9JJprFb5rvfFSO",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"title": {
"__id__": 3
},
"pic": {
"__id__": 15
},
"picSelected": {
"__id__": 10
},
"soundCorrect": {
"__uuid__": "8ea4585c-d8c0-4de1-96b6-64373d5783f5"
},
"soundWrong": {
"__uuid__": "527638c3-faf2-4a3e-9fa4-d5b9bfe38876"
},
"stars": {
"__id__": 23
},
"_audioTitle": null,
"_isPlaying": false,
"_isAnswer": false,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "46d02514-75e2-4973-9a0b-bc662330bfb3"
},
"fileId": "800MXKqZ9CFozCk8oSt2AF",
"sync": false
}
]
\ No newline at end of file
{
"ver": "1.2.7",
"uuid": "46d02514-75e2-4973-9a0b-bc662330bfb3",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"readonly": false,
"subMetas": {}
}
\ No newline at end of file
[
{
"__type__": "cc.Prefab",
"_name": "",
"_objFlags": 0,
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"asyncLoadAssets": false,
"readonly": false
},
{
"__type__": "cc.Node",
"_name": "op_2",
"_objFlags": 0,
"_parent": null,
"_children": [
{
"__id__": 2
},
{
"__id__": 6
},
{
"__id__": 10
},
{
"__id__": 13
},
{
"__id__": 19
},
{
"__id__": 23
}
],
"_active": true,
"_components": [
{
"__id__": 26
},
{
"__id__": 27
}
],
"_prefab": {
"__id__": 28
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 375,
"height": 355
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
152.5,
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": ""
},
{
"__type__": "cc.Node",
"_name": "title",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 3
},
{
"__id__": 4
}
],
"_prefab": {
"__id__": 5
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 80,
"g": 123,
"b": 214,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 594,
"height": 94
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 1
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
126.5,
0,
0,
0,
0,
1,
0.5,
0.5,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": ""
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_useOriginalSize": false,
"_string": "",
"_N$string": "",
"_fontSize": 50,
"_lineHeight": 52,
"_enableWrapText": true,
"_N$file": {
"__uuid__": "2ce69722-dd5c-4c59-8aab-030f9274292f"
},
"_isSystemFontUsed": false,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 0,
"_underlineHeight": 0,
"_N$horizontalAlign": 0,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 2,
"_N$cacheMode": 0,
"_id": ""
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 1,
"_left": 0,
"_right": 0,
"_top": 51,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "e4ef9fc9-937c-46a9-86a0-51a30401974e"
},
"fileId": "7c/FybGCxEF6DnTMnWlita",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "btnSound",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 7
}
],
"_prefab": {
"__id__": 9
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 80,
"g": 123,
"b": 214,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 375,
"height": 115
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
61.611,
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": ""
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 6
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [
{
"__id__": 8
}
],
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$transition": 0,
"transition": 0,
"_N$normalColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"_N$hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$disabledColor": {
"__type__": "cc.Color",
"r": 124,
"g": 124,
"b": 124,
"a": 255
},
"_N$normalSprite": null,
"_N$pressedSprite": null,
"pressedSprite": null,
"_N$hoverSprite": null,
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": null,
"_id": ""
},
{
"__type__": "cc.ClickEvent",
"target": {
"__id__": 1
},
"component": "",
"_componentId": "0e35cajgN9JJprFb5rvfFSO",
"handler": "clickTitle",
"customEventData": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "e4ef9fc9-937c-46a9-86a0-51a30401974e"
},
"fileId": "90WmTxvyBM2J9kmoGoLzya",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "1-6@3x_select",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 11
}
],
"_prefab": {
"__id__": 12
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 387.5,
"height": 288
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
-62,
0,
0,
0,
0,
1,
0.87,
0.664,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": ""
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 10
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 1,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "8676e03d-253c-47db-aee9-45e71a343f66"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "e4ef9fc9-937c-46a9-86a0-51a30401974e"
},
"fileId": "f1MUwIhfFC/pGIjKp5ZvcE",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "pic_mask",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [
{
"__id__": 14
}
],
"_active": true,
"_components": [
{
"__id__": 17
}
],
"_prefab": {
"__id__": 18
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 323,
"height": 180
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
1,
-62,
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": ""
},
{
"__type__": "cc.Node",
"_name": "sprite",
"_objFlags": 0,
"_parent": {
"__id__": 13
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 15
}
],
"_prefab": {
"__id__": 16
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 323,
"height": 180
},
"_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": ""
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 14
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": null,
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "e4ef9fc9-937c-46a9-86a0-51a30401974e"
},
"fileId": "fd49xn9NZPIq31DQ0fUKdn",
"sync": false
},
{
"__type__": "cc.Mask",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 13
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_spriteFrame": {
"__uuid__": "78b30afb-9a6f-40f1-bf2e-cb58f835f140"
},
"_type": 2,
"_segments": 64,
"_N$alphaThreshold": 0.6,
"_N$inverted": false,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "e4ef9fc9-937c-46a9-86a0-51a30401974e"
},
"fileId": "abC3V94LlNBqfKuQCKe8ps",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "btn_click",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 20
}
],
"_prefab": {
"__id__": 22
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 80,
"g": 123,
"b": 214,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 375,
"height": 218
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 1
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
42.375,
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": ""
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 19
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [
{
"__id__": 21
}
],
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$transition": 0,
"transition": 0,
"_N$normalColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"_N$hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$disabledColor": {
"__type__": "cc.Color",
"r": 124,
"g": 124,
"b": 124,
"a": 255
},
"_N$normalSprite": null,
"_N$pressedSprite": null,
"pressedSprite": null,
"_N$hoverSprite": null,
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": null,
"_id": ""
},
{
"__type__": "cc.ClickEvent",
"target": {
"__id__": 1
},
"component": "",
"_componentId": "0e35cajgN9JJprFb5rvfFSO",
"handler": "clickPic",
"customEventData": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "e4ef9fc9-937c-46a9-86a0-51a30401974e"
},
"fileId": "a9Z8BydSNFPYDakVhD+ftD",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "particle_star",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 24
}
],
"_prefab": {
"__id__": 25
},
"_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",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
-62,
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": ""
},
{
"__type__": "cc.ParticleSystem",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 23
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_custom": true,
"_file": {
"__uuid__": "fed3a7de-bed5-46e5-8d20-10530d6aea5c"
},
"_spriteFrame": {
"__uuid__": "f530b049-279c-4f38-bf14-7921d575ef52"
},
"_texture": null,
"_stopped": true,
"playOnLoad": true,
"autoRemoveOnFinish": false,
"totalParticles": 191,
"duration": 0.22,
"emissionRate": 100,
"life": 0.47,
"lifeVar": 0,
"_startColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_startColorVar": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_endColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_endColorVar": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"angle": 17,
"angleVar": 180,
"startSize": 20,
"startSizeVar": 41,
"endSize": -1,
"endSizeVar": 0,
"startSpin": 0,
"startSpinVar": 0,
"endSpin": 0,
"endSpinVar": 0,
"sourcePos": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"posVar": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_positionType": 1,
"positionType": 1,
"emitterMode": 0,
"gravity": {
"__type__": "cc.Vec2",
"x": -20,
"y": 420
},
"speed": 280,
"speedVar": 20,
"tangentialAccel": -700,
"tangentialAccelVar": 0,
"radialAccel": 0,
"radialAccelVar": 0,
"rotationIsDir": false,
"startRadius": 0,
"startRadiusVar": 0,
"endRadius": 0,
"endRadiusVar": 0,
"rotatePerS": 0,
"rotatePerSVar": 0,
"_N$preview": true,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "e4ef9fc9-937c-46a9-86a0-51a30401974e"
},
"fileId": "d9TeW0g+dEho1LejrZTby3",
"sync": false
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "60ac123b-e869-476d-a732-a38e518d7122"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": ""
},
{
"__type__": "0e35cajgN9JJprFb5rvfFSO",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"title": {
"__id__": 3
},
"pic": {
"__id__": 15
},
"picSelected": {
"__id__": 10
},
"soundCorrect": {
"__uuid__": "8ea4585c-d8c0-4de1-96b6-64373d5783f5"
},
"soundWrong": {
"__uuid__": "527638c3-faf2-4a3e-9fa4-d5b9bfe38876"
},
"stars": {
"__id__": 23
},
"_audioTitle": null,
"_isPlaying": false,
"_isAnswer": false,
"_isDone": false,
"_allowClick": true,
"_count": 0,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "e4ef9fc9-937c-46a9-86a0-51a30401974e"
},
"fileId": "74rWFfqaVPXae/d000cKl/",
"sync": false
}
]
\ No newline at end of file
{
"ver": "1.2.7",
"uuid": "e4ef9fc9-937c-46a9-86a0-51a30401974e",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"readonly": false,
"subMetas": {}
}
\ No newline at end of file
[
{
"__type__": "cc.Prefab",
"_name": "",
"_objFlags": 0,
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"asyncLoadAssets": false,
"readonly": false
},
{
"__type__": "cc.Node",
"_name": "particle_star",
"_objFlags": 0,
"_parent": null,
"_children": [],
"_active": true,
"_components": [
{
"__id__": 2
}
],
"_prefab": {
"__id__": 3
},
"_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",
"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": ""
},
{
"__type__": "cc.ParticleSystem",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_custom": true,
"_file": {
"__uuid__": "fed3a7de-bed5-46e5-8d20-10530d6aea5c"
},
"_spriteFrame": {
"__uuid__": "f530b049-279c-4f38-bf14-7921d575ef52"
},
"_texture": null,
"_stopped": true,
"playOnLoad": true,
"autoRemoveOnFinish": false,
"totalParticles": 191,
"duration": 0.22,
"emissionRate": 100,
"life": 0.47,
"lifeVar": 0,
"_startColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_startColorVar": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_endColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_endColorVar": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"angle": 17,
"angleVar": 180,
"startSize": 20,
"startSizeVar": 41,
"endSize": -1,
"endSizeVar": 0,
"startSpin": 0,
"startSpinVar": 0,
"endSpin": 0,
"endSpinVar": 0,
"sourcePos": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"posVar": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_positionType": 1,
"positionType": 1,
"emitterMode": 0,
"gravity": {
"__type__": "cc.Vec2",
"x": -20,
"y": 420
},
"speed": 280,
"speedVar": 20,
"tangentialAccel": -700,
"tangentialAccelVar": 0,
"radialAccel": 0,
"radialAccelVar": 0,
"rotationIsDir": false,
"startRadius": 0,
"startRadiusVar": 0,
"endRadius": 0,
"endRadiusVar": 0,
"rotatePerS": 0,
"rotatePerSVar": 0,
"_N$preview": true,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "49EmNiomZEf7rS3H5mSigY",
"sync": false
}
]
\ No newline at end of file
{
"ver": "1.2.7",
"uuid": "d64be458-35de-4d57-973d-cc6e7a5ec7cb",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"readonly": false,
"subMetas": {}
}
\ No newline at end of file
......@@ -78,19 +78,28 @@
"__id__": 7
},
{
"__id__": 14
"__id__": 10
},
{
"__id__": 13
},
{
"__id__": 22
},
{
"__id__": 29
}
],
"_active": true,
"_components": [
{
"__id__": 24
"__id__": 32
},
{
"__id__": 25
"__id__": 33
},
{
"__id__": 26
"__id__": 34
}
],
"_prefab": null,
......@@ -180,7 +189,7 @@
"array": [
0,
0,
362.85545494732423,
381.91720306893745,
0,
0,
0,
......@@ -317,7 +326,7 @@
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "8288e3d4-4c75-4b27-8f01-f7014417f4dd"
"__uuid__": "368b6871-aff2-4359-a2f9-05e97727853b"
},
"_type": 0,
"_sizeMode": 1,
......@@ -335,23 +344,23 @@
},
{
"__type__": "cc.Node",
"_name": "bottomPart",
"_name": "背景素材",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [
"_children": [],
"_active": true,
"_components": [
{
"__id__": 8
},
{
"__id__": 11
"__id__": 9
}
],
"_active": true,
"_components": [],
"_prefab": null,
"_opacity": 255,
"_opacity": 140.25,
"_color": {
"__type__": "cc.Color",
"r": 255,
......@@ -361,8 +370,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
"width": 1367,
"height": 491
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -373,8 +382,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
635.132,
-356.326,
0,
-114.5,
0,
0,
0,
......@@ -396,23 +405,82 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "8c7k8ep/ZFNpO263+1QHz9"
"_id": "d7itN2kABHgoBukSkJUEQ3"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "940ff868-68e9-4755-8cc0-dd440f4a6630"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "6fuJYshdtGhr5ZAFyQKlq0"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 4,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "a2PP5WtJJIbbhkwiBa55OG"
},
{
"__type__": "cc.Node",
"_name": "btn_left",
"_name": "前景白云",
"_objFlags": 0,
"_parent": {
"__id__": 7
"__id__": 2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 9
"__id__": 11
},
{
"__id__": 10
"__id__": 12
}
],
"_prefab": null,
......@@ -426,8 +494,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 61,
"height": 67
"width": 1280,
"height": 94
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -438,8 +506,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-148.464,
34,
0,
-313,
0,
0,
0,
......@@ -461,14 +529,14 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "5ad2wLQLxIN5Eg7OHecSH6"
"_id": "fb24WuTclI1atOkrf8cXl+"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 8
"__id__": 10
},
"_enabled": true,
"_materials": [
......@@ -479,7 +547,7 @@
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "ce19457d-e8f3-4c38-ae3e-d4b99208ddb5"
"__uuid__": "eaa871d1-1e77-4dd0-8c70-f63d694d45be"
},
"_type": 0,
"_sizeMode": 1,
......@@ -493,91 +561,125 @@
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "84mqOgJ3JNqZrYVTEU8CjE"
"_id": "244Ox66/pKvq8Uo7Qg23p4"
},
{
"__type__": "cc.Button",
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 8
"__id__": 10
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [],
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$transition": 0,
"transition": 0,
"_N$normalColor": {
"alignMode": 1,
"_target": null,
"_alignFlags": 44,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 1280,
"_originalHeight": 0,
"_id": "731B60fRFMWIHskXUQxEbk"
},
{
"__type__": "cc.Node",
"_name": "title",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [
{
"__id__": 14
}
],
"_active": true,
"_components": [
{
"__id__": 18
},
{
"__id__": 19
},
{
"__id__": 20
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
"_contentSize": {
"__type__": "cc.Size",
"width": 464,
"height": 105
},
"_N$hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-343,
287.5,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_N$disabledColor": {
"__type__": "cc.Color",
"r": 124,
"g": 124,
"b": 124,
"a": 255
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_N$normalSprite": null,
"_N$pressedSprite": null,
"pressedSprite": null,
"_N$hoverSprite": null,
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": null,
"_id": "bcYN/4EKBJhbIAfovo9Ah1"
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "b0mFiJ4CpFDqXrwttDGVs6"
},
{
"__type__": "cc.Node",
"_name": "btn_right",
"_name": "label",
"_objFlags": 0,
"_parent": {
"__id__": 7
"__id__": 13
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 12
"__id__": 15
},
{
"__id__": 13
"__id__": 16
},
{
"__id__": 17
}
],
"_prefab": null,
......@@ -591,27 +693,27 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 60,
"height": 66
"width": 572,
"height": 139.04
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"x": 0,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-47.164,
34,
-99.77600000000001,
0,
0,
0,
0,
0,
1,
1,
1,
0.5,
0.5,
1
]
},
......@@ -626,14 +728,14 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "46i3stdzpHX6zQHTGnRsNE"
"_id": "97HZYQJWtG04TDmuP+E/kF"
},
{
"__type__": "cc.Sprite",
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 11
"__id__": 14
},
"_enabled": true,
"_materials": [
......@@ -643,36 +745,148 @@
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "e5a2dbaa-a677-4a32-90d7-a1b057d7fb59"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
"_useOriginalSize": false,
"_string": "",
"_N$string": "",
"_fontSize": 72,
"_lineHeight": 104,
"_enableWrapText": true,
"_N$file": {
"__uuid__": "c551970e-b095-45f3-9f1d-25cde8b8deb1"
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "42Sh8QS/BHn4WiGyPQPKPt"
"_isSystemFontUsed": false,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 0,
"_underlineHeight": 0,
"_N$horizontalAlign": 0,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 2,
"_N$cacheMode": 0,
"_id": "f0UXkWnUpOwZ94Yv6Gt6my"
},
{
"__type__": "cc.Button",
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 11
"__id__": 14
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"alignMode": 1,
"_target": null,
"_alignFlags": 8,
"_left": 132.224,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "b5VTe9gZJMgJHD1vxsYk1D"
},
{
"__type__": "cc.LabelOutline",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 14
},
"_enabled": true,
"_color": {
"__type__": "cc.Color",
"r": 230,
"g": 51,
"b": 65,
"a": 219
},
"_width": 4,
"_id": "5fHbJ3diVEg5J/m6rxGdsP"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 13
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "1bc7daec-c3c3-4c4a-b65a-d0d0eb67d156"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "31EjihVvhANY0dRdIzj1Sz"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 13
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 9,
"_left": 65,
"_right": 0,
"_top": 20,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "80s/Dd5KdHN5XPzbHGs24V"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 13
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [],
"clickEvents": [
{
"__id__": 21
}
],
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$transition": 0,
......@@ -726,90 +940,42 @@
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": null,
"_id": "1aj32fYY1IxLesa77E70Qu"
"_id": "12I2yYNsRDUaVEgCFp+o0q"
},
{
"__type__": "cc.Node",
"_name": "res",
"_objFlags": 0,
"_parent": {
"__type__": "cc.ClickEvent",
"target": {
"__id__": 2
},
"_children": [
{
"__id__": 15
},
{
"__id__": 18
},
{
"__id__": 21
}
],
"_active": false,
"_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",
"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": "0aAzbH6R1E+6AmGRrkKa5O"
"component": "",
"_componentId": "f4edeRi+NdAabqAkVYRwFjK",
"handler": "playTitle",
"customEventData": ""
},
{
"__type__": "cc.Node",
"_name": "font",
"_name": "question",
"_objFlags": 0,
"_parent": {
"__id__": 14
"__id__": 2
},
"_children": [
{
"__id__": 16
"__id__": 23
}
],
"_active": true,
"_components": [],
"_components": [
{
"__id__": 25
},
{
"__id__": 26
},
{
"__id__": 27
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
......@@ -821,8 +987,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
"width": 1043,
"height": 185
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -834,7 +1000,7 @@
"ctor": "Float64Array",
"array": [
0,
0,
140.5,
0,
0,
0,
......@@ -856,35 +1022,35 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "9bLfcYeeNKrr524vzWchiM"
"_id": "327N+7zilKcIgSjcKLUP7V"
},
{
"__type__": "cc.Node",
"_name": "BRLNSDB",
"_name": "label",
"_objFlags": 0,
"_parent": {
"__id__": 15
"__id__": 22
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 17
"__id__": 24
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"r": 80,
"g": 123,
"b": 214,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
"width": 1800,
"height": 131.04
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -902,8 +1068,8 @@
0,
0,
1,
1,
1,
0.5,
0.5,
1
]
},
......@@ -918,177 +1084,61 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "cfMLGsq0BMhJARv+ySMAxS"
"_id": "475BENpDZFBr+ql4aDJdye"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 16
"__id__": 23
},
"_enabled": true,
"_materials": [],
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_useOriginalSize": true,
"_useOriginalSize": false,
"_string": "",
"_N$string": "",
"_fontSize": 40,
"_lineHeight": 40,
"_fontSize": 80,
"_lineHeight": 104,
"_enableWrapText": true,
"_N$file": {
"__uuid__": "c551970e-b095-45f3-9f1d-25cde8b8deb1"
"__uuid__": "2ce69722-dd5c-4c59-8aab-030f9274292f"
},
"_isSystemFontUsed": false,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 0,
"_underlineHeight": 0,
"_N$horizontalAlign": 0,
"_N$verticalAlign": 0,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$overflow": 2,
"_N$cacheMode": 0,
"_id": "9bNHNPu5lC7rQYyr8ai/sY"
},
{
"__type__": "cc.Node",
"_name": "img",
"_objFlags": 0,
"_parent": {
"__id__": 14
},
"_children": [
{
"__id__": 19
}
],
"_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",
"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": "53LUHHG2pEr79fyrvazXJs"
},
{
"__type__": "cc.Node",
"_name": "icon",
"_objFlags": 0,
"_parent": {
"__id__": 18
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 20
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 138,
"height": 141
},
"_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": "1blU2OArJIfoC9XfupGxJG"
"_id": "dab/NGA85CFqJIq1qBE8tf"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 19
"__id__": 22
},
"_enabled": true,
"_materials": [],
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "6fbc30a8-3c49-44ae-8ba4-7f56f385b78a"
"__uuid__": "6b0bbf88-8d88-4667-8281-be659f1432d7"
},
"_type": 0,
"_sizeMode": 1,
......@@ -1100,84 +1150,134 @@
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_isTrimmedMode": false,
"_atlas": null,
"_id": "03GEWUEZJGyKormWgIWCtM"
"_id": "52k8Gaf89ImakpetZwEgxg"
},
{
"__type__": "cc.Node",
"_name": "audio",
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"_parent": {
"__id__": 14
"node": {
"__id__": 22
},
"_children": [
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 1,
"_left": 0,
"_right": 0,
"_top": 127,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "29QVJgfxdIwLuV/uGKiUvB"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 22
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [
{
"__id__": 22
"__id__": 28
}
],
"_active": true,
"_components": [],
"_prefab": null,
"_opacity": 255,
"_color": {
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$transition": 0,
"transition": 0,
"_N$normalColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
"_N$pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
"pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
"_N$hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
"hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "b823DIVC9L+Ihc3T9Bt7m3"
"_N$disabledColor": {
"__type__": "cc.Color",
"r": 124,
"g": 124,
"b": 124,
"a": 255
},
"_N$normalSprite": null,
"_N$pressedSprite": null,
"pressedSprite": null,
"_N$hoverSprite": null,
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": null,
"_id": "2dKsah7+BODpUvn5MXHZpd"
},
{
"__type__": "cc.ClickEvent",
"target": {
"__id__": 2
},
"component": "",
"_componentId": "f4edeRi+NdAabqAkVYRwFjK",
"handler": "playQuestion",
"customEventData": ""
},
{
"__type__": "cc.Node",
"_name": "btn",
"_name": "options",
"_objFlags": 0,
"_parent": {
"__id__": 21
"__id__": 2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 23
"__id__": 30
},
{
"__id__": 31
}
],
"_prefab": null,
......@@ -1191,8 +1291,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
"width": -12,
"height": 352
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -1204,14 +1304,14 @@
"ctor": "Float64Array",
"array": [
0,
-176.2,
0,
0,
0,
0,
0,
1,
1,
1,
0.8,
0.8,
1
]
},
......@@ -1226,25 +1326,66 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "3d0p0/uJZJIoRva5Br2iqv"
"_id": "c39biV71BKWL8R+KUZLW5Z"
},
{
"__type__": "cc.AudioSource",
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 22
"__id__": 29
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 4,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 43,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "abjqpUY/9Bh7AomYZrtsTQ"
},
{
"__type__": "cc.Layout",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 29
},
"_enabled": true,
"_clip": {
"__uuid__": "f0680ae0-c079-45ef-abd7-9e63d90b982b"
},
"_volume": 1,
"_mute": false,
"_loop": false,
"playOnLoad": false,
"preload": false,
"_id": "0adN50f61DlbmppsPkOnjX"
"_layoutSize": {
"__type__": "cc.Size",
"width": -12,
"height": 352
},
"_resize": 1,
"_N$layoutType": 1,
"_N$cellSize": {
"__type__": "cc.Size",
"width": 40,
"height": 40
},
"_N$startAxis": 0,
"_N$paddingLeft": 0,
"_N$paddingRight": 0,
"_N$paddingTop": 0,
"_N$paddingBottom": 0,
"_N$spacingX": 12,
"_N$spacingY": 0,
"_N$verticalDirection": 1,
"_N$horizontalDirection": 0,
"_N$affectedByScale": false,
"_id": "830bHE3kZM7LAWOcn0VoNv"
},
{
"__type__": "cc.Canvas",
......@@ -1298,6 +1439,26 @@
"__id__": 2
},
"_enabled": true,
"options": {
"__id__": 29
},
"title": {
"__id__": 15
},
"question": {
"__id__": 24
},
"openMusic": {
"__uuid__": "82894da6-cdf9-4aa2-be54-0d5f3b8c4ff6"
},
"op_1": {
"__uuid__": "46d02514-75e2-4973-9a0b-bc662330bfb3"
},
"op_2": {
"__uuid__": "e4ef9fc9-937c-46a9-86a0-51a30401974e"
},
"_isPlayTitle": false,
"_isPlayQuestion": false,
"_id": "e687yyoRBIzZAOVRL8Sseh"
}
]
\ No newline at end of file
// Learn cc.Class:
// - https://docs.cocos.com/creator/manual/en/scripting/class.html
// Learn Attribute:
// - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
// - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html
/**
* 主场景
*/
cc.Class({
extends: cc.Component,
properties: {
},
// 生命周期 onLoad
onLoad() {
this.initSceneData();
this.initSize();
},
_imageResList: null,
_audioResList: null,
_animaResList: null,
initSceneData() {
this._imageResList = [];
this._audioResList = [];
this._animaResList = [];
},
_designSize: null, // 设计分辨率
_frameSize: null, // 屏幕分辨率
_mapScaleMin: null, // 场景中常用缩放(取大值)
_mapScaleMax: null, // 场景中常用缩放(取小值)
_cocosScale: null, // cocos 自缩放 (较少用到)
initSize() {
// 注意cc.winSize只有在适配后(修改fitHeight/fitWidth后)才能获取到正确的值,因此使用cc.getFrameSize()来获取初始的屏幕大小
let screen_size = cc.view.getFrameSize().width / cc.view.getFrameSize().height
let design_size = cc.Canvas.instance.designResolution.width / cc.Canvas.instance.designResolution.height
let f = screen_size >= design_size
cc.Canvas.instance.fitHeight = f
cc.Canvas.instance.fitWidth = !f
const frameSize = cc.view.getFrameSize();
this._frameSize = frameSize;
this._designSize = cc.view.getDesignResolutionSize();
let sx = cc.winSize.width / frameSize.width;
let sy = cc.winSize.height / frameSize.height;
this._cocosScale = Math.min(sx, sy);
sx = frameSize.width / this._designSize.width;
sy = frameSize.height / this._designSize.height;
this._mapScaleMin = Math.min(sx, sy) * this._cocosScale;
this._mapScaleMax = Math.max(sx, sy) * this._cocosScale;
},
// 生命周期 start
start() {
let getData = this.getData.bind(this);
if (window && window.courseware) {
getData = window.courseware.getData;
}
getData((data) => {
console.log('data:', data);
this.data = data || this.getDefaultData();
this.data = JSON.parse(JSON.stringify(this.data))
this.preloadItem()
})
},
getData(cb) {
cb(this.getDefaultData());
},
getDefaultData() {
const dataJson = '{"pic_url":"http://staging-teach.cdn.ireadabc.com/ed94332a503c31e0908bd4c6923a2665.png","pic_url_2":"http://staging-teach.cdn.ireadabc.com/5fb60317ade0195d35ad8034d5370a7f.png","text":"This is a test label.","audio_url":"http://staging-teach.cdn.ireadabc.com/f47f1d7b5c160fe1c59500d180346240.mp3"}'
const data = JSON.parse(dataJson);
return data;
},
preloadItem() {
this.addPreloadImage();
this.addPreloadAudio();
this.addPreloadAnima();
this.preload();
},
addPreloadImage() {
this._imageResList.push({ url: this.data.pic_url });
this._imageResList.push({ url: this.data.pic_url_2 });
},
addPreloadAudio() {
this._audioResList.push({ url: this.data.audio_url });
},
addPreloadAnima() {
},
preload() {
const preloadArr = this._imageResList.concat(this._audioResList).concat(this._animaResList);
cc.assetManager.loadAny(preloadArr, null, null, (err, data) => {
this.loadEnd();
if (window && window["air"]) {
window["air"].hideAirClassLoading();
}
cc.debug.setDisplayStats(false);
});
},
loadEnd() {
this.initData();
this.initAudio();
this.initView();
// this.initListener();
},
_cantouch: null,
initData() {
// 所有全局变量 默认都是null
this._cantouch = true;
},
audioBtn: null,
initAudio() {
const audioNode = cc.find('Canvas/res/audio');
const getAudioByResName = (resName) => {
return audioNode.getChildByName(resName).getComponent(cc.AudioSource);
}
this.audioBtn = getAudioByResName('btn');
},
initView() {
this.initBg();
this.initPic();
this.initBtn();
this.initIcon();
},
initBg() {
const bgNode = cc.find('Canvas/bg');
bgNode.scale = this._mapScaleMax;
},
pic1: null,
pic2: null,
initPic() {
const canvas = cc.find('Canvas');
const maxW = canvas.width * 0.7;
this.getSprNodeByUrl(this.data.pic_url, (sprNode) => {
const picNode1 = sprNode;
picNode1.scale = maxW / picNode1.width;
picNode1.baseX = picNode1.x;
canvas.addChild(picNode1);
this.pic1 = picNode1;
const labelNode = new cc.Node();
labelNode.color = cc.Color.YELLOW;
const label = labelNode.addComponent(cc.Label);
label.string = this.data.text;
label.fontSize = 60;
label.lineHeight = 60;
label.font = cc.find('Canvas/res/font/BRLNSDB').getComponent('cc.Label').font;
picNode1.addChild(labelNode);
});
this.getSprNodeByUrl(this.data.pic_url_2, (sprNode) => {
const picNode2 = sprNode;
picNode2.scale = maxW / picNode2.width;
canvas.addChild(picNode2);
picNode2.x = canvas.width;
picNode2.baseX = picNode2.x;
this.pic2 = picNode2;
const labelNode = new cc.Node();
const label = labelNode.addComponent(cc.RichText);
const size = 60
label.font = cc.find('Canvas/res/font/BRLNSDB').getComponent(cc.Label).font;
label.string = `<outline color=#751e00 width=4><size=${size}><color=#ffffff>${this.data.text}</color></size></outline>`
label.lineHeight = size;
picNode2.addChild(labelNode);
});
},
initIcon() {
const iconNode = this.getSprNode('icon');
iconNode.zIndex = 5;
iconNode.anchorX = 1;
iconNode.anchorY = 1;
iconNode.parent = cc.find('Canvas');
iconNode.x = iconNode.parent.width / 2 - 10;
iconNode.y = iconNode.parent.height / 2 - 10;
iconNode.on(cc.Node.EventType.TOUCH_START, () => {
this.playAudioByUrl(this.data.audio_url);
})
},
curPage: null,
initBtn() {
this.curPage = 0;
const bottomPart = cc.find('Canvas/bottomPart');
bottomPart.zIndex = 5; // 提高层级
bottomPart.x = bottomPart.parent.width / 2;
bottomPart.y = -bottomPart.parent.height / 2;
const leftBtnNode = bottomPart.getChildByName('btn_left');
//节点中添加了button组件 则可以添加click事件监听
leftBtnNode.on('click', () => {
if (!this._cantouch) {
return;
}
if (this.curPage == 0) {
return;
}
this.curPage = 0
this.leftMove();
cc.audioEngine.play(this.audioBtn.clip, false, 0.8)
})
const rightBtnNode = bottomPart.getChildByName('btn_right');
//节点中添加了button组件 则可以添加click事件监听
rightBtnNode.on('click', () => {
if (!this._cantouch) {
return;
}
if (this.curPage == 1) {
return;
}
this.curPage = 1
this.rightMove();
cc.audioEngine.play(this.audioBtn.clip, false, 0.5)
})
},
leftMove() {
this._cantouch = false;
const len = this.pic1.parent.width;
cc.tween(this.pic1)
.to(1, { x: this.pic1.baseX }, { easing: 'cubicInOut' })
.start();
cc.tween(this.pic2)
.to(1, { x: this.pic2.baseX }, { easing: 'cubicInOut' })
.call(() => {
this._cantouch = true;
})
.start();
},
rightMove() {
this._cantouch = false;
const len = this.pic1.parent.width;
cc.tween(this.pic1)
.to(1, { x: this.pic1.baseX - len }, { easing: 'cubicInOut' })
.start();
cc.tween(this.pic2)
.to(1, { x: this.pic2.baseX - len }, { easing: 'cubicInOut' })
.call(() => {
this._cantouch = true;
})
.start();
},
// update (dt) {},
// ------------------------------------------------
getSprNode(resName) {
const sf = cc.find('Canvas/res/img/' + resName).getComponent(cc.Sprite).spriteFrame;
const node = new cc.Node();
node.addComponent(cc.Sprite).spriteFrame = sf;
return node;
},
getSpriteFrimeByUrl(url, cb) {
cc.loader.load({ url }, (err, img) => {
const spriteFrame = new cc.SpriteFrame(img)
if (cb) {
cb(spriteFrame);
}
})
},
getSprNodeByUrl(url, cb) {
const node = new cc.Node();
const spr = node.addComponent(cc.Sprite);
this.getSpriteFrimeByUrl(url, (sf) => {
spr.spriteFrame = sf;
if (cb) {
cb(node);
}
})
},
playAudioByUrl(audio_url, cb = null) {
if (audio_url) {
cc.assetManager.loadRemote(audio_url, (err, audioClip) => {
const audioId = cc.audioEngine.play(audioClip, false, 0.8);
if (cb) {
cc.audioEngine.setFinishCallback(audioId, () => {
cb();
});
}
});
}
},
// ------------------------------------------
extends: cc.Component,
properties: {
options: {
default: null,
type: cc.Node,
},
// 标题
title: {
default: null,
type: cc.Label,
},
question: {
default: null,
type: cc.Label,
},
openMusic: {
default: null,
type: cc.AudioClip,
},
op_1: {
default: null,
type: cc.Prefab,
},
op_2: {
default: null,
type: cc.Prefab,
},
_isPlayTitle: false,
_isPlayQuestion: false,
},
// 生命周期 onLoad
onLoad() {
this.initSceneData();
this.initSize();
},
_imageResList: null,
_audioResList: null,
_animaResList: null,
initSceneData() {
this._imageResList = [];
this._audioResList = [];
this._animaResList = [];
},
_designSize: null, // 设计分辨率
_frameSize: null, // 屏幕分辨率
_mapScaleMin: null, // 场景中常用缩放(取大值)
_mapScaleMax: null, // 场景中常用缩放(取小值)
_cocosScale: null, // cocos 自缩放 (较少用到)
initSize() {
// 注意cc.winSize只有在适配后(修改fitHeight/fitWidth后)才能获取到正确的值,因此使用cc.getFrameSize()来获取初始的屏幕大小
let screen_size = cc.view.getFrameSize().width / cc.view.getFrameSize().height;
let design_size = cc.Canvas.instance.designResolution.width / cc.Canvas.instance.designResolution.height;
let f = screen_size >= design_size;
cc.Canvas.instance.fitHeight = f;
cc.Canvas.instance.fitWidth = !f;
const frameSize = cc.view.getFrameSize();
this._frameSize = frameSize;
this._designSize = cc.view.getDesignResolutionSize();
let sx = cc.winSize.width / frameSize.width;
let sy = cc.winSize.height / frameSize.height;
this._cocosScale = Math.min(sx, sy);
sx = frameSize.width / this._designSize.width;
sy = frameSize.height / this._designSize.height;
this._mapScaleMin = Math.min(sx, sy) * this._cocosScale;
this._mapScaleMax = Math.max(sx, sy) * this._cocosScale;
},
// 生命周期 start
start() {
let getData = this.getData.bind(this);
if (window && window.courseware) {
getData = window.courseware.getData;
}
getData((data) => {
console.log("data:", data);
this.data = data || this.getDefaultData();
this.data = JSON.parse(JSON.stringify(this.data));
this.preloadItem();
});
},
getData(cb) {
cb(this.getDefaultData());
},
getDefaultData() {
const dataJson =
'{"title":"test","answer":1,"question":"hello world","options":[{"pic_url":"http://staging-teach.cdn.ireadabc.com/c5a7a94fbebdbf635952454cbe8b3371.jpeg","audio_url":"http://staging-teach.cdn.ireadabc.com/fff5204fc774e932bcd597b4094b0852.mp3","text":"选项1"},{"pic_url":"http://staging-teach.cdn.ireadabc.com/3064a1f8bec54390c031b2c2d8b84e7f.jpeg","audio_url":"http://staging-teach.cdn.ireadabc.com/e8627e7f3ec1a04fdb3660eae81f7636.mp3","text":"选项2"}],"audio_title":"http://staging-teach.cdn.ireadabc.com/f7fb9f71ab7d460ac2f78c85efba7610.mp3","audio_question":"http://staging-teach.cdn.ireadabc.com/7934cdcec68eabe639020bad5420d7f8.mp3"}';
const data = JSON.parse(dataJson);
return data;
},
preloadItem() {
this.addPreloadImage();
this.addPreloadAudio();
this.addPreloadAnima();
this.preload();
},
addPreloadImage() {
for (var i = 0; i < this.data.options; i++) {
this._imageResList.push({ url: this.data.options[i]["pic_url"] });
}
},
addPreloadAudio() {
for (var i = 0; i < this.data.total; i++) {
this._audioResList.push({ url: this.data.options[i]["audio_url"] });
}
this._audioResList.push({ url: this.data.audio_title });
this._audioResList.push({ url: this.data.audio_question });
},
addPreloadAnima() {},
preload() {
const preloadArr = this._imageResList.concat(this._audioResList).concat(this._animaResList);
cc.assetManager.loadAny(preloadArr, null, null, (err, data) => {
this.loadEnd();
if (window && window["air"]) {
window["air"].hideAirClassLoading();
}
cc.debug.setDisplayStats(false);
});
},
loadEnd() {
this.initData();
this.initView();
},
_cantouch: null,
initData() {
// 所有全局变量 默认都是null
this._cantouch = true;
},
initView() {
this.initBg();
// 初始化title
this.title.string = this.data.title;
this.question.string = this.data.question;
let count = this.data.options.length;
let scale = 1;
let countScale = this.data.options.length - 4;
if (countScale > 0) {
scale = 1 - countScale * 0.16;
}
this.options.scale = scale;
for (let i = 0; i < this.data.options.length; i++) {
let op = null;
if (count >= 4) {
op = cc.instantiate(this.op_1);
} else {
op = cc.instantiate(this.op_2);
}
if (i == this.data.answer) {
op.getComponent("option")._isAnswer = true;
}
op.getComponent("option").setPic(this.data.options[i].pic_url);
op.getComponent("option").title.string = this.data.options[i].text;
op.getComponent("option")._audioTitle = this.data.options[i].audio_url;
op.getComponent("option")._count = this.data.options.length;
this.options.addChild(op);
}
cc.audioEngine.playEffect(this.openMusic, false);
},
playTitle() {
if (this.data.audio_title && !this._isPlayTitle) {
this._isPlayTitle = true;
this.playAudioByUrl(this.data.audio_title, () => {
this._isPlayTitle = false;
});
}
},
playQuestion() {
if (this.data.audio_question && !this._isPlayQuestion) {
this._isPlayQuestion = true;
this.playAudioByUrl(this.data.audio_question, () => {
this._isPlayQuestion = false;
});
}
},
initBg() {
const bgNode = cc.find("Canvas/bg");
bgNode.scale = this._mapScaleMax;
},
// ------------------------------------------------
getSprNode(resName) {
const sf = cc.find("Canvas/res/img/" + resName).getComponent(cc.Sprite).spriteFrame;
const node = new cc.Node();
node.addComponent(cc.Sprite).spriteFrame = sf;
return node;
},
getSpriteFrimeByUrl(url, cb) {
cc.loader.load({ url }, (err, img) => {
const spriteFrame = new cc.SpriteFrame(img);
if (cb) {
cb(spriteFrame);
}
});
},
getSprNodeByUrl(url, cb) {
const node = new cc.Node();
const spr = node.addComponent(cc.Sprite);
this.getSpriteFrimeByUrl(url, (sf) => {
spr.spriteFrame = sf;
if (cb) {
cb(node);
}
});
},
playAudioByUrl(audio_url, cb = null) {
if (audio_url) {
cc.assetManager.loadRemote(audio_url, (err, audioClip) => {
const audioId = cc.audioEngine.play(audioClip, false);
if (cb) {
cc.audioEngine.setFinishCallback(audioId, () => {
cb();
});
}
});
}
},
// ------------------------------------------
});
/**
* 选项
*/
cc.Class({
extends: cc.Component,
properties: {
title: {
default: null,
type: cc.Label,
},
pic: {
default: null,
type: cc.Sprite,
},
picSelected: {
default: null,
type: cc.Node,
},
soundCorrect: {
default: null,
type: cc.AudioClip,
},
soundWrong: {
default: null,
type: cc.AudioClip,
},
stars: {
default: null,
type: cc.Node,
},
_audioTitle: null,
_isPlaying: false,
_isAnswer: false,
_isDone: false,
_allowClick: true,
_count: 0,
},
onEnable() {
cc.game.on("DONE", this.setDone, this);
this._allowClick = true;
},
onDisable() {
cc.game.off("DONE", this.setDone, this);
},
setPic(pic_url) {
cc.assetManager.loadRemote(pic_url, (err, img) => {
var frame = new cc.SpriteFrame(img);
let frameSize = frame.getOriginalSize();
let targetWidth = 0;
if (this._count >= 4) {
targetWidth = 244;
} else {
targetWidth = 323;
}
// let scale = 1;
// if (frameSize.height > 180) {
// scale = 168 / frameSize.height;
// }
// this.pic.spriteFrame = frame;
// this.pic.node.width = frameSize.width * scale;
// this.pic.node.height = frameSize.height * scale;
let scale = 1;
scale = targetWidth / frameSize.width;
this.pic.spriteFrame = frame;
this.pic.node.width = frameSize.width * scale;
this.pic.node.height = frameSize.height * scale;
});
},
setTitle(title) {
this.title.string = title;
},
clickTitle() {
if (this._audioTitle != null && !this._isPlaying) {
this._isPlaying = true;
cc.assetManager.loadRemote(this._audioTitle, (err, audioClip) => {
const audioId = cc.audioEngine.play(audioClip, false);
cc.audioEngine.setFinishCallback(audioId, () => {
this._isPlaying = false;
});
});
}
},
clickPic() {
if (this._isDone || !this._allowClick) {
return;
}
this.picSelected.active = true;
if (this._isAnswer) {
cc.audioEngine.playEffect(this.soundCorrect);
this.stars.active = true;
cc.game.emit("DONE");
} else {
this._allowClick = false;
let id = cc.audioEngine.playEffect(this.soundWrong);
cc.audioEngine.setFinishCallback(id, () => {
this.picSelected.active = false;
this._allowClick = true;
});
}
},
setDone() {
this._isDone = true;
},
});
{
"ver": "1.0.8",
"uuid": "0e35c6a3-80df-4926-9ac5-6f9aef7c548e",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "47b22fe2-9fa9-4ed4-9172-dcd07e981533",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 738,
"height": 540,
"platformSettings": {},
"subMetas": {
"1-6@3x": {
"ver": "1.0.4",
"uuid": "2359cab7-72d3-46cd-bc33-a37eb03a072a",
"rawTextureUuid": "47b22fe2-9fa9-4ed4-9172-dcd07e981533",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -1,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 736,
"height": 540,
"rawWidth": 738,
"rawHeight": 540,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "d582359e-924e-4ee9-9964-1fc4bb417e71",
"uuid": "3c0013a9-2d3c-45cf-a33a-099e8b6d9e1c",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 61,
"height": 67,
"width": 969,
"height": 540,
"platformSettings": {},
"subMetas": {
"btn_right": {
"1-6@3x_2": {
"ver": "1.0.4",
"uuid": "e5a2dbaa-a677-4a32-90d7-a1b057d7fb59",
"rawTextureUuid": "d582359e-924e-4ee9-9964-1fc4bb417e71",
"uuid": "78b30afb-9a6f-40f1-bf2e-cb58f835f140",
"rawTextureUuid": "3c0013a9-2d3c-45cf-a33a-099e8b6d9e1c",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -0.5,
"offsetY": 0.5,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 60,
"height": 66,
"rawWidth": 61,
"rawHeight": 67,
"width": 968,
"height": 540,
"rawWidth": 969,
"rawHeight": 540,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
......
{
"ver": "2.3.5",
"uuid": "5c505b78-9409-4aec-ad50-2ea92f364453",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": true,
"genMipmaps": false,
"packable": true,
"width": 789,
"height": 588,
"platformSettings": {},
"subMetas": {
"1-6@3x_select": {
"ver": "1.0.4",
"uuid": "8676e03d-253c-47db-aee9-45e71a343f66",
"rawTextureUuid": "5c505b78-9409-4aec-ad50-2ea92f364453",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -1,
"offsetY": 0,
"trimX": 6,
"trimY": 6,
"width": 775,
"height": 576,
"rawWidth": 789,
"rawHeight": 588,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "a8de5ea3-e1e6-455b-9518-259201f17f95",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 464,
"height": 105,
"platformSettings": {},
"subMetas": {
"_e-标题": {
"ver": "1.0.4",
"uuid": "1bc7daec-c3c3-4c4a-b65a-d0d0eb67d156",
"rawTextureUuid": "a8de5ea3-e1e6-455b-9518-259201f17f95",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 464,
"height": 105,
"rawWidth": 464,
"rawHeight": 105,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "18d07592-51a9-421e-8972-0f67b68d29e1",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 144,
"height": 144,
"platformSettings": {},
"subMetas": {
"icon": {
"ver": "1.0.4",
"uuid": "6fbc30a8-3c49-44ae-8ba4-7f56f385b78a",
"rawTextureUuid": "18d07592-51a9-421e-8972-0f67b68d29e1",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": -0.5,
"trimX": 3,
"trimY": 2,
"width": 138,
"height": 141,
"rawWidth": 144,
"rawHeight": 144,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "fcb666ce-fc34-4a23-9f40-f8bec16f9da6",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 1280,
"height": 94,
"platformSettings": {},
"subMetas": {
"前景白云": {
"ver": "1.0.4",
"uuid": "eaa871d1-1e77-4dd0-8c70-f63d694d45be",
"rawTextureUuid": "fcb666ce-fc34-4a23-9f40-f8bec16f9da6",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 1280,
"height": 94,
"rawWidth": 1280,
"rawHeight": 94,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "9a79969a-0506-48d4-bc98-3c05d109b027",
"uuid": "ccb90057-811a-42b9-a90b-626b90946b9f",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 61,
"height": 67,
"width": 246,
"height": 180,
"platformSettings": {},
"subMetas": {
"btn_left": {
"图片": {
"ver": "1.0.4",
"uuid": "ce19457d-e8f3-4c38-ae3e-d4b99208ddb5",
"rawTextureUuid": "9a79969a-0506-48d4-bc98-3c05d109b027",
"uuid": "1b75f452-5d9f-4913-8c66-2525b5990b1e",
"rawTextureUuid": "ccb90057-811a-42b9-a90b-626b90946b9f",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
......@@ -22,10 +22,10 @@
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 61,
"height": 67,
"rawWidth": 61,
"rawHeight": 67,
"width": 246,
"height": 180,
"rawWidth": 246,
"rawHeight": 180,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
......
{
"ver": "2.3.5",
"uuid": "4e61811c-4be5-4980-8416-b01df7dbe5fc",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 500,
"height": 281,
"platformSettings": {},
"subMetas": {
"白云": {
"ver": "1.0.4",
"uuid": "d43284fa-9176-4322-b5d0-4a938e66b6f1",
"rawTextureUuid": "4e61811c-4be5-4980-8416-b01df7dbe5fc",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 500,
"height": 281,
"rawWidth": 500,
"rawHeight": 281,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "b2df1870-2eb0-408f-860a-737931f55686",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 293,
"height": 352,
"platformSettings": {},
"subMetas": {
"白色背景": {
"ver": "1.0.4",
"uuid": "60ac123b-e869-476d-a732-a38e518d7122",
"rawTextureUuid": "b2df1870-2eb0-408f-860a-737931f55686",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 293,
"height": 352,
"rawWidth": 293,
"rawHeight": 352,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "d838b057-9b98-43cd-9a36-0142501ddc86",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 1367,
"height": 491,
"platformSettings": {},
"subMetas": {
"背景素材": {
"ver": "1.0.4",
"uuid": "940ff868-68e9-4755-8cc0-dd440f4a6630",
"rawTextureUuid": "d838b057-9b98-43cd-9a36-0142501ddc86",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 1367,
"height": 491,
"rawWidth": 1367,
"rawHeight": 491,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "e1b4d971-9876-4832-803a-5a321964a78b",
"uuid": "bf3e6da6-40f8-4e6e-9cab-05a7eb72fe2d",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
......@@ -11,10 +11,10 @@
"height": 720,
"platformSettings": {},
"subMetas": {
"bg": {
"背景色": {
"ver": "1.0.4",
"uuid": "8288e3d4-4c75-4b27-8f01-f7014417f4dd",
"rawTextureUuid": "e1b4d971-9876-4832-803a-5a321964a78b",
"uuid": "368b6871-aff2-4359-a2f9-05e97727853b",
"rawTextureUuid": "bf3e6da6-40f8-4e6e-9cab-05a7eb72fe2d",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
......
{
"ver": "2.3.5",
"uuid": "5e7589af-6d32-4d90-ac6f-81ff666c0a34",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 1043,
"height": 185,
"platformSettings": {},
"subMetas": {
"题目背景": {
"ver": "1.0.4",
"uuid": "6b0bbf88-8d88-4667-8281-be659f1432d7",
"rawTextureUuid": "5e7589af-6d32-4d90-ac6f-81ff666c0a34",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 1043,
"height": 185,
"rawWidth": 1043,
"rawHeight": 185,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"game": {
"name": "未知游戏",
"name": "UNKNOW GAME",
"appid": "UNKNOW"
}
}
\ No newline at end of file
No preview for this file type
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